var YL=Object.defineProperty;var mO=e=>{throw TypeError(e)};var QL=(e,t,r)=>t in e?YL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var lt=(e,t,r)=>QL(e,typeof t!="symbol"?t+"":t,r),Lm=(e,t,r)=>t.has(e)||mO("Cannot "+r);var F=(e,t,r)=>(Lm(e,t,"read from private field"),r?r.call(e):t.get(e)),Ne=(e,t,r)=>t.has(e)?mO("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ge=(e,t,r,n)=>(Lm(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),ze=(e,t,r)=>(Lm(e,t,"access private method"),r);var wf=(e,t,r,n)=>({set _(i){ge(e,t,i,r)},get _(){return F(e,t,n)}});function JL(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();var xf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bm={exports:{}},Sl={},Fm={exports:{}},qe={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var yO;function ZL(){if(yO)return qe;yO=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.iterator;function y(I){return I===null||typeof I!="object"?null:(I=h&&I[h]||I["@@iterator"],typeof I=="function"?I:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,w={};function v(I,z,le){this.props=I,this.context=z,this.refs=w,this.updater=le||b}v.prototype.isReactComponent={},v.prototype.setState=function(I,z){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,z,"setState")},v.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function x(){}x.prototype=v.prototype;function O(I,z,le){this.props=I,this.context=z,this.refs=w,this.updater=le||b}var A=O.prototype=new x;A.constructor=O,S(A,v.prototype),A.isPureReactComponent=!0;var P=Array.isArray,E=Object.prototype.hasOwnProperty,T={current:null},j={key:!0,ref:!0,__self:!0,__source:!0};function R(I,z,le){var pe,he={},we=null,ye=null;if(z!=null)for(pe in z.ref!==void 0&&(ye=z.ref),z.key!==void 0&&(we=""+z.key),z)E.call(z,pe)&&!j.hasOwnProperty(pe)&&(he[pe]=z[pe]);var Ae=arguments.length-2;if(Ae===1)he.children=le;else if(1>>1,z=G[I];if(0>>1;Ii(he,W))wei(ye,he)?(G[I]=ye,G[we]=W,I=we):(G[I]=he,G[pe]=W,I=pe);else if(wei(ye,W))G[I]=ye,G[we]=W,I=we;else break e}}return re}function i(G,re){var W=G.sortIndex-re.sortIndex;return W!==0?W:G.id-re.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var c=[],d=[],p=1,h=null,y=3,b=!1,S=!1,w=!1,v=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(G){for(var re=r(d);re!==null;){if(re.callback===null)n(d);else if(re.startTime<=G)n(d),re.sortIndex=re.expirationTime,t(c,re);else break;re=r(d)}}function P(G){if(w=!1,A(G),!S)if(r(c)!==null)S=!0,Z(E);else{var re=r(d);re!==null&&te(P,re.startTime-G)}}function E(G,re){S=!1,w&&(w=!1,x(R),R=-1),b=!0;var W=y;try{for(A(re),h=r(c);h!==null&&(!(h.expirationTime>re)||G&&!q());){var I=h.callback;if(typeof I=="function"){h.callback=null,y=h.priorityLevel;var z=I(h.expirationTime<=re);re=e.unstable_now(),typeof z=="function"?h.callback=z:h===r(c)&&n(c),A(re)}else n(c);h=r(c)}if(h!==null)var le=!0;else{var pe=r(d);pe!==null&&te(P,pe.startTime-re),le=!1}return le}finally{h=null,y=W,b=!1}}var T=!1,j=null,R=-1,N=5,V=-1;function q(){return!(e.unstable_now()-VG||125I?(G.sortIndex=W,t(d,G),r(c)===null&&G===r(d)&&(w?(x(R),R=-1):w=!0,te(P,W-I))):(G.sortIndex=z,t(c,G),S||b||(S=!0,Z(E))),G},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(G){var re=y;return function(){var W=y;y=re;try{return G.apply(this,arguments)}finally{y=W}}}})(zm)),zm}var xO;function iB(){return xO||(xO=1,Um.exports=nB()),Um.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var _O;function oB(){if(_O)return wr;_O=1;var e=ax(),t=iB();function r(a){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+a,f=1;f"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},h={};function y(a){return c.call(h,a)?!0:c.call(p,a)?!1:d.test(a)?h[a]=!0:(p[a]=!0,!1)}function b(a,l,f,m){if(f!==null&&f.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return m?!1:f!==null?!f.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function S(a,l,f,m){if(l===null||typeof l>"u"||b(a,l,f,m))return!0;if(m)return!1;if(f!==null)switch(f.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function w(a,l,f,m,g,_,k){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=m,this.attributeNamespace=g,this.mustUseProperty=f,this.propertyName=a,this.type=l,this.sanitizeURL=_,this.removeEmptyString=k}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){v[a]=new w(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var l=a[0];v[l]=new w(l,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){v[a]=new w(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){v[a]=new w(a,2,!1,a,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){v[a]=new w(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){v[a]=new w(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){v[a]=new w(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){v[a]=new w(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){v[a]=new w(a,5,!1,a.toLowerCase(),null,!1,!1)});var x=/[\-:]([a-z])/g;function O(a){return a[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var l=a.replace(x,O);v[l]=new w(l,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var l=a.replace(x,O);v[l]=new w(l,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var l=a.replace(x,O);v[l]=new w(l,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){v[a]=new w(a,1,!1,a.toLowerCase(),null,!1,!1)}),v.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){v[a]=new w(a,1,!1,a.toLowerCase(),null,!0,!0)});function A(a,l,f,m){var g=v.hasOwnProperty(l)?v[l]:null;(g!==null?g.type!==0:m||!(2M||g[k]!==_[M]){var D=` `+g[k].replace(" at new "," at ");return a.displayName&&D.includes("")&&(D=D.replace("",a.displayName)),D}while(1<=k&&0<=M);break}}}finally{le=!1,Error.prepareStackTrace=f}return(a=a?a.displayName||a.name:"")?z(a):""}function he(a){switch(a.tag){case 5:return z(a.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return a=pe(a.type,!1),a;case 11:return a=pe(a.type.render,!1),a;case 1:return a=pe(a.type,!0),a;default:return""}}function we(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case j:return"Fragment";case T:return"Portal";case N:return"Profiler";case R:return"StrictMode";case K:return"Suspense";case Y:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case q:return(a.displayName||"Context")+".Consumer";case V:return(a._context.displayName||"Context")+".Provider";case L:var l=a.render;return a=a.displayName,a||(a=l.displayName||l.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case Q:return l=a.displayName||null,l!==null?l:we(a.type)||"Memo";case Z:l=a._payload,a=a._init;try{return we(a(l))}catch{}}return null}function ye(a){var l=a.type;switch(a.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=l.render,a=a.displayName||a.name||"",l.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return we(l);case 8:return l===R?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function Ae(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function ie(a){var l=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Ee(a){var l=ie(a)?"checked":"value",f=Object.getOwnPropertyDescriptor(a.constructor.prototype,l),m=""+a[l];if(!a.hasOwnProperty(l)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var g=f.get,_=f.set;return Object.defineProperty(a,l,{configurable:!0,get:function(){return g.call(this)},set:function(k){m=""+k,_.call(this,k)}}),Object.defineProperty(a,l,{enumerable:f.enumerable}),{getValue:function(){return m},setValue:function(k){m=""+k},stopTracking:function(){a._valueTracker=null,delete a[l]}}}}function Re(a){a._valueTracker||(a._valueTracker=Ee(a))}function oe(a){if(!a)return!1;var l=a._valueTracker;if(!l)return!0;var f=l.getValue(),m="";return a&&(m=ie(a)?a.checked?"true":"false":a.value),a=m,a!==f?(l.setValue(a),!0):!1}function Le(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function Ce(a,l){var f=l.checked;return W({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:f??a._wrapperState.initialChecked})}function dt(a,l){var f=l.defaultValue==null?"":l.defaultValue,m=l.checked!=null?l.checked:l.defaultChecked;f=Ae(l.value!=null?l.value:f),a._wrapperState={initialChecked:m,initialValue:f,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function at(a,l){l=l.checked,l!=null&&A(a,"checked",l,!1)}function rt(a,l){at(a,l);var f=Ae(l.value),m=l.type;if(f!=null)m==="number"?(f===0&&a.value===""||a.value!=f)&&(a.value=""+f):a.value!==""+f&&(a.value=""+f);else if(m==="submit"||m==="reset"){a.removeAttribute("value");return}l.hasOwnProperty("value")?it(a,l.type,f):l.hasOwnProperty("defaultValue")&&it(a,l.type,Ae(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(a.defaultChecked=!!l.defaultChecked)}function Te(a,l,f){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var m=l.type;if(!(m!=="submit"&&m!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+a._wrapperState.initialValue,f||l===a.value||(a.value=l),a.defaultValue=l}f=a.name,f!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,f!==""&&(a.name=f)}function it(a,l,f){(l!=="number"||Le(a.ownerDocument)!==a)&&(f==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+f&&(a.defaultValue=""+f))}var Rt=Array.isArray;function wt(a,l,f,m){if(a=a.options,l){l={};for(var g=0;g"+l.valueOf().toString()+"",l=fc.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}});function Bs(a,l){if(l){var f=a.firstChild;if(f&&f===a.lastChild&&f.nodeType===3){f.nodeValue=l;return}}a.textContent=l}var Fs={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},eD=["Webkit","ms","Moz","O"];Object.keys(Fs).forEach(function(a){eD.forEach(function(l){l=l+a.charAt(0).toUpperCase()+a.substring(1),Fs[l]=Fs[a]})});function k1(a,l,f){return l==null||typeof l=="boolean"||l===""?"":f||typeof l!="number"||l===0||Fs.hasOwnProperty(a)&&Fs[a]?(""+l).trim():l+"px"}function j1(a,l){a=a.style;for(var f in l)if(l.hasOwnProperty(f)){var m=f.indexOf("--")===0,g=k1(f,l[f],m);f==="float"&&(f="cssFloat"),m?a.setProperty(f,g):a[f]=g}}var tD=W({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Yh(a,l){if(l){if(tD[a]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(r(137,a));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(r(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(r(61))}if(l.style!=null&&typeof l.style!="object")throw Error(r(62))}}function Qh(a,l){if(a.indexOf("-")===-1)return typeof l.is=="string";switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Jh=null;function Zh(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var ep=null,oa=null,aa=null;function R1(a){if(a=ll(a)){if(typeof ep!="function")throw Error(r(280));var l=a.stateNode;l&&(l=Mc(l),ep(a.stateNode,a.type,l))}}function N1(a){oa?aa?aa.push(a):aa=[a]:oa=a}function M1(){if(oa){var a=oa,l=aa;if(aa=oa=null,R1(a),l)for(a=0;a>>=0,a===0?32:31-(dD(a)/hD|0)|0}var yc=64,gc=4194304;function Hs(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function vc(a,l){var f=a.pendingLanes;if(f===0)return 0;var m=0,g=a.suspendedLanes,_=a.pingedLanes,k=f&268435455;if(k!==0){var M=k&~g;M!==0?m=Hs(M):(_&=k,_!==0&&(m=Hs(_)))}else k=f&~g,k!==0?m=Hs(k):_!==0&&(m=Hs(_));if(m===0)return 0;if(l!==0&&l!==m&&(l&g)===0&&(g=m&-m,_=l&-l,g>=_||g===16&&(_&4194240)!==0))return l;if((m&4)!==0&&(m|=f&16),l=a.entangledLanes,l!==0)for(a=a.entanglements,l&=m;0f;f++)l.push(a);return l}function Ws(a,l,f){a.pendingLanes|=l,l!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,l=31-en(l),a[l]=f}function gD(a,l){var f=a.pendingLanes&~l;a.pendingLanes=l,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=l,a.mutableReadLanes&=l,a.entangledLanes&=l,l=a.entanglements;var m=a.eventTimes;for(a=a.expirationTimes;0=Zs),l_=" ",u_=!1;function c_(a,l){switch(a){case"keyup":return WD.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function f_(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var ua=!1;function KD(a,l){switch(a){case"compositionend":return f_(l);case"keypress":return l.which!==32?null:(u_=!0,l_);case"textInput":return a=l.data,a===l_&&u_?null:a;default:return null}}function XD(a,l){if(ua)return a==="compositionend"||!vp&&c_(a,l)?(a=r_(),Sc=dp=fi=null,ua=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:f,offset:l-a};a=m}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=v_(f)}}function w_(a,l){return a&&l?a===l?!0:a&&a.nodeType===3?!1:l&&l.nodeType===3?w_(a,l.parentNode):"contains"in a?a.contains(l):a.compareDocumentPosition?!!(a.compareDocumentPosition(l)&16):!1:!1}function x_(){for(var a=window,l=Le();l instanceof a.HTMLIFrameElement;){try{var f=typeof l.contentWindow.location.href=="string"}catch{f=!1}if(f)a=l.contentWindow;else break;l=Le(a.document)}return l}function xp(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l&&(l==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||l==="textarea"||a.contentEditable==="true")}function nL(a){var l=x_(),f=a.focusedElem,m=a.selectionRange;if(l!==f&&f&&f.ownerDocument&&w_(f.ownerDocument.documentElement,f)){if(m!==null&&xp(f)){if(l=m.start,a=m.end,a===void 0&&(a=l),"selectionStart"in f)f.selectionStart=l,f.selectionEnd=Math.min(a,f.value.length);else if(a=(l=f.ownerDocument||document)&&l.defaultView||window,a.getSelection){a=a.getSelection();var g=f.textContent.length,_=Math.min(m.start,g);m=m.end===void 0?_:Math.min(m.end,g),!a.extend&&_>m&&(g=m,m=_,_=g),g=b_(f,_);var k=b_(f,m);g&&k&&(a.rangeCount!==1||a.anchorNode!==g.node||a.anchorOffset!==g.offset||a.focusNode!==k.node||a.focusOffset!==k.offset)&&(l=l.createRange(),l.setStart(g.node,g.offset),a.removeAllRanges(),_>m?(a.addRange(l),a.extend(k.node,k.offset)):(l.setEnd(k.node,k.offset),a.addRange(l)))}}for(l=[],a=f;a=a.parentNode;)a.nodeType===1&&l.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f=document.documentMode,ca=null,_p=null,nl=null,Sp=!1;function __(a,l,f){var m=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;Sp||ca==null||ca!==Le(m)||(m=ca,"selectionStart"in m&&xp(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),nl&&rl(nl,m)||(nl=m,m=jc(_p,"onSelect"),0ma||(a.current=Ip[ma],Ip[ma]=null,ma--)}function st(a,l){ma++,Ip[ma]=a.current,a.current=l}var mi={},Zt=pi(mi),mr=pi(!1),no=mi;function ya(a,l){var f=a.type.contextTypes;if(!f)return mi;var m=a.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===l)return m.__reactInternalMemoizedMaskedChildContext;var g={},_;for(_ in f)g[_]=l[_];return m&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=l,a.__reactInternalMemoizedMaskedChildContext=g),g}function yr(a){return a=a.childContextTypes,a!=null}function Ic(){pt(mr),pt(Zt)}function D_(a,l,f){if(Zt.current!==mi)throw Error(r(168));st(Zt,l),st(mr,f)}function L_(a,l,f){var m=a.stateNode;if(l=l.childContextTypes,typeof m.getChildContext!="function")return f;m=m.getChildContext();for(var g in m)if(!(g in l))throw Error(r(108,ye(a)||"Unknown",g));return W({},f,m)}function $c(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||mi,no=Zt.current,st(Zt,a),st(mr,mr.current),!0}function B_(a,l,f){var m=a.stateNode;if(!m)throw Error(r(169));f?(a=L_(a,l,no),m.__reactInternalMemoizedMergedChildContext=a,pt(mr),pt(Zt),st(Zt,a)):pt(mr),st(mr,f)}var Nn=null,Dc=!1,$p=!1;function F_(a){Nn===null?Nn=[a]:Nn.push(a)}function mL(a){Dc=!0,F_(a)}function yi(){if(!$p&&Nn!==null){$p=!0;var a=0,l=Ze;try{var f=Nn;for(Ze=1;a>=k,g-=k,Mn=1<<32-en(l)+g|f<Ie?(Ut=je,je=null):Ut=je.sibling;var Ke=ae(X,je,J[Ie],ce);if(Ke===null){je===null&&(je=Ut);break}a&&je&&Ke.alternate===null&&l(X,je),U=_(Ke,U,Ie),ke===null?Pe=Ke:ke.sibling=Ke,ke=Ke,je=Ut}if(Ie===J.length)return f(X,je),yt&&oo(X,Ie),Pe;if(je===null){for(;IeIe?(Ut=je,je=null):Ut=je.sibling;var Ei=ae(X,je,Ke.value,ce);if(Ei===null){je===null&&(je=Ut);break}a&&je&&Ei.alternate===null&&l(X,je),U=_(Ei,U,Ie),ke===null?Pe=Ei:ke.sibling=Ei,ke=Ei,je=Ut}if(Ke.done)return f(X,je),yt&&oo(X,Ie),Pe;if(je===null){for(;!Ke.done;Ie++,Ke=J.next())Ke=ue(X,Ke.value,ce),Ke!==null&&(U=_(Ke,U,Ie),ke===null?Pe=Ke:ke.sibling=Ke,ke=Ke);return yt&&oo(X,Ie),Pe}for(je=m(X,je);!Ke.done;Ie++,Ke=J.next())Ke=me(je,X,Ie,Ke.value,ce),Ke!==null&&(a&&Ke.alternate!==null&&je.delete(Ke.key===null?Ie:Ke.key),U=_(Ke,U,Ie),ke===null?Pe=Ke:ke.sibling=Ke,ke=Ke);return a&&je.forEach(function(GL){return l(X,GL)}),yt&&oo(X,Ie),Pe}function Et(X,U,J,ce){if(typeof J=="object"&&J!==null&&J.type===j&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case E:e:{for(var Pe=J.key,ke=U;ke!==null;){if(ke.key===Pe){if(Pe=J.type,Pe===j){if(ke.tag===7){f(X,ke.sibling),U=g(ke,J.props.children),U.return=X,X=U;break e}}else if(ke.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===Z&&V_(Pe)===ke.type){f(X,ke.sibling),U=g(ke,J.props),U.ref=ul(X,ke,J),U.return=X,X=U;break e}f(X,ke);break}else l(X,ke);ke=ke.sibling}J.type===j?(U=po(J.props.children,X.mode,ce,J.key),U.return=X,X=U):(ce=df(J.type,J.key,J.props,null,X.mode,ce),ce.ref=ul(X,U,J),ce.return=X,X=ce)}return k(X);case T:e:{for(ke=J.key;U!==null;){if(U.key===ke)if(U.tag===4&&U.stateNode.containerInfo===J.containerInfo&&U.stateNode.implementation===J.implementation){f(X,U.sibling),U=g(U,J.children||[]),U.return=X,X=U;break e}else{f(X,U);break}else l(X,U);U=U.sibling}U=Nm(J,X.mode,ce),U.return=X,X=U}return k(X);case Z:return ke=J._init,Et(X,U,ke(J._payload),ce)}if(Rt(J))return xe(X,U,J,ce);if(re(J))return Oe(X,U,J,ce);qc(X,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,U!==null&&U.tag===6?(f(X,U.sibling),U=g(U,J),U.return=X,X=U):(f(X,U),U=Rm(J,X.mode,ce),U.return=X,X=U),k(X)):f(X,U)}return Et}var wa=K_(!0),X_=K_(!1),Uc=pi(null),zc=null,xa=null,Up=null;function zp(){Up=xa=zc=null}function Hp(a){var l=Uc.current;pt(Uc),a._currentValue=l}function Wp(a,l,f){for(;a!==null;){var m=a.alternate;if((a.childLanes&l)!==l?(a.childLanes|=l,m!==null&&(m.childLanes|=l)):m!==null&&(m.childLanes&l)!==l&&(m.childLanes|=l),a===f)break;a=a.return}}function _a(a,l){zc=a,Up=xa=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&l)!==0&&(gr=!0),a.firstContext=null)}function $r(a){var l=a._currentValue;if(Up!==a)if(a={context:a,memoizedValue:l,next:null},xa===null){if(zc===null)throw Error(r(308));xa=a,zc.dependencies={lanes:0,firstContext:a}}else xa=xa.next=a;return l}var ao=null;function Vp(a){ao===null?ao=[a]:ao.push(a)}function G_(a,l,f,m){var g=l.interleaved;return g===null?(f.next=f,Vp(l)):(f.next=g.next,g.next=f),l.interleaved=f,$n(a,m)}function $n(a,l){a.lanes|=l;var f=a.alternate;for(f!==null&&(f.lanes|=l),f=a,a=a.return;a!==null;)a.childLanes|=l,f=a.alternate,f!==null&&(f.childLanes|=l),f=a,a=a.return;return f.tag===3?f.stateNode:null}var gi=!1;function Kp(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Y_(a,l){a=a.updateQueue,l.updateQueue===a&&(l.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Dn(a,l){return{eventTime:a,lane:l,tag:0,payload:null,callback:null,next:null}}function vi(a,l,f){var m=a.updateQueue;if(m===null)return null;if(m=m.shared,(Ve&2)!==0){var g=m.pending;return g===null?l.next=l:(l.next=g.next,g.next=l),m.pending=l,$n(a,f)}return g=m.interleaved,g===null?(l.next=l,Vp(m)):(l.next=g.next,g.next=l),m.interleaved=l,$n(a,f)}function Hc(a,l,f){if(l=l.updateQueue,l!==null&&(l=l.shared,(f&4194240)!==0)){var m=l.lanes;m&=a.pendingLanes,f|=m,l.lanes=f,sp(a,f)}}function Q_(a,l){var f=a.updateQueue,m=a.alternate;if(m!==null&&(m=m.updateQueue,f===m)){var g=null,_=null;if(f=f.firstBaseUpdate,f!==null){do{var k={eventTime:f.eventTime,lane:f.lane,tag:f.tag,payload:f.payload,callback:f.callback,next:null};_===null?g=_=k:_=_.next=k,f=f.next}while(f!==null);_===null?g=_=l:_=_.next=l}else g=_=l;f={baseState:m.baseState,firstBaseUpdate:g,lastBaseUpdate:_,shared:m.shared,effects:m.effects},a.updateQueue=f;return}a=f.lastBaseUpdate,a===null?f.firstBaseUpdate=l:a.next=l,f.lastBaseUpdate=l}function Wc(a,l,f,m){var g=a.updateQueue;gi=!1;var _=g.firstBaseUpdate,k=g.lastBaseUpdate,M=g.shared.pending;if(M!==null){g.shared.pending=null;var D=M,ee=D.next;D.next=null,k===null?_=ee:k.next=ee,k=D;var se=a.alternate;se!==null&&(se=se.updateQueue,M=se.lastBaseUpdate,M!==k&&(M===null?se.firstBaseUpdate=ee:M.next=ee,se.lastBaseUpdate=D))}if(_!==null){var ue=g.baseState;k=0,se=ee=D=null,M=_;do{var ae=M.lane,me=M.eventTime;if((m&ae)===ae){se!==null&&(se=se.next={eventTime:me,lane:0,tag:M.tag,payload:M.payload,callback:M.callback,next:null});e:{var xe=a,Oe=M;switch(ae=l,me=f,Oe.tag){case 1:if(xe=Oe.payload,typeof xe=="function"){ue=xe.call(me,ue,ae);break e}ue=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=Oe.payload,ae=typeof xe=="function"?xe.call(me,ue,ae):xe,ae==null)break e;ue=W({},ue,ae);break e;case 2:gi=!0}}M.callback!==null&&M.lane!==0&&(a.flags|=64,ae=g.effects,ae===null?g.effects=[M]:ae.push(M))}else me={eventTime:me,lane:ae,tag:M.tag,payload:M.payload,callback:M.callback,next:null},se===null?(ee=se=me,D=ue):se=se.next=me,k|=ae;if(M=M.next,M===null){if(M=g.shared.pending,M===null)break;ae=M,M=ae.next,ae.next=null,g.lastBaseUpdate=ae,g.shared.pending=null}}while(!0);if(se===null&&(D=ue),g.baseState=D,g.firstBaseUpdate=ee,g.lastBaseUpdate=se,l=g.shared.interleaved,l!==null){g=l;do k|=g.lane,g=g.next;while(g!==l)}else _===null&&(g.shared.lanes=0);uo|=k,a.lanes=k,a.memoizedState=ue}}function J_(a,l,f){if(a=l.effects,l.effects=null,a!==null)for(l=0;lf?f:4,a(!0);var m=Jp.transition;Jp.transition={};try{a(!1),l()}finally{Ze=f,Jp.transition=m}}function gS(){return Dr().memoizedState}function bL(a,l,f){var m=_i(a);if(f={lane:m,action:f,hasEagerState:!1,eagerState:null,next:null},vS(a))bS(l,f);else if(f=G_(a,l,f,m),f!==null){var g=ur();sn(f,a,m,g),wS(f,l,m)}}function wL(a,l,f){var m=_i(a),g={lane:m,action:f,hasEagerState:!1,eagerState:null,next:null};if(vS(a))bS(l,g);else{var _=a.alternate;if(a.lanes===0&&(_===null||_.lanes===0)&&(_=l.lastRenderedReducer,_!==null))try{var k=l.lastRenderedState,M=_(k,f);if(g.hasEagerState=!0,g.eagerState=M,tn(M,k)){var D=l.interleaved;D===null?(g.next=g,Vp(l)):(g.next=D.next,D.next=g),l.interleaved=g;return}}catch{}finally{}f=G_(a,l,g,m),f!==null&&(g=ur(),sn(f,a,m,g),wS(f,l,m))}}function vS(a){var l=a.alternate;return a===bt||l!==null&&l===bt}function bS(a,l){hl=Xc=!0;var f=a.pending;f===null?l.next=l:(l.next=f.next,f.next=l),a.pending=l}function wS(a,l,f){if((f&4194240)!==0){var m=l.lanes;m&=a.pendingLanes,f|=m,l.lanes=f,sp(a,f)}}var Qc={readContext:$r,useCallback:er,useContext:er,useEffect:er,useImperativeHandle:er,useInsertionEffect:er,useLayoutEffect:er,useMemo:er,useReducer:er,useRef:er,useState:er,useDebugValue:er,useDeferredValue:er,useTransition:er,useMutableSource:er,useSyncExternalStore:er,useId:er,unstable_isNewReconciler:!1},xL={readContext:$r,useCallback:function(a,l){return vn().memoizedState=[a,l===void 0?null:l],a},useContext:$r,useEffect:uS,useImperativeHandle:function(a,l,f){return f=f!=null?f.concat([a]):null,Gc(4194308,4,dS.bind(null,l,a),f)},useLayoutEffect:function(a,l){return Gc(4194308,4,a,l)},useInsertionEffect:function(a,l){return Gc(4,2,a,l)},useMemo:function(a,l){var f=vn();return l=l===void 0?null:l,a=a(),f.memoizedState=[a,l],a},useReducer:function(a,l,f){var m=vn();return l=f!==void 0?f(l):l,m.memoizedState=m.baseState=l,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:l},m.queue=a,a=a.dispatch=bL.bind(null,bt,a),[m.memoizedState,a]},useRef:function(a){var l=vn();return a={current:a},l.memoizedState=a},useState:sS,useDebugValue:om,useDeferredValue:function(a){return vn().memoizedState=a},useTransition:function(){var a=sS(!1),l=a[0];return a=vL.bind(null,a[1]),vn().memoizedState=a,[l,a]},useMutableSource:function(){},useSyncExternalStore:function(a,l,f){var m=bt,g=vn();if(yt){if(f===void 0)throw Error(r(407));f=f()}else{if(f=l(),qt===null)throw Error(r(349));(lo&30)!==0||rS(m,l,f)}g.memoizedState=f;var _={value:f,getSnapshot:l};return g.queue=_,uS(iS.bind(null,m,_,a),[a]),m.flags|=2048,yl(9,nS.bind(null,m,_,f,l),void 0,null),f},useId:function(){var a=vn(),l=qt.identifierPrefix;if(yt){var f=In,m=Mn;f=(m&~(1<<32-en(m)-1)).toString(32)+f,l=":"+l+"R"+f,f=pl++,0<\/script>",a=a.removeChild(a.firstChild)):typeof m.is=="string"?a=k.createElement(f,{is:m.is}):(a=k.createElement(f),f==="select"&&(k=a,m.multiple?k.multiple=!0:m.size&&(k.size=m.size))):a=k.createElementNS(a,f),a[yn]=l,a[sl]=m,FS(a,l,!1,!1),l.stateNode=a;e:{switch(k=Qh(f,m),f){case"dialog":ht("cancel",a),ht("close",a),g=m;break;case"iframe":case"object":case"embed":ht("load",a),g=m;break;case"video":case"audio":for(g=0;gPa&&(l.flags|=128,m=!0,gl(_,!1),l.lanes=4194304)}else{if(!m)if(a=Vc(k),a!==null){if(l.flags|=128,m=!0,f=a.updateQueue,f!==null&&(l.updateQueue=f,l.flags|=4),gl(_,!0),_.tail===null&&_.tailMode==="hidden"&&!k.alternate&&!yt)return tr(l),null}else 2*Ot()-_.renderingStartTime>Pa&&f!==1073741824&&(l.flags|=128,m=!0,gl(_,!1),l.lanes=4194304);_.isBackwards?(k.sibling=l.child,l.child=k):(f=_.last,f!==null?f.sibling=k:l.child=k,_.last=k)}return _.tail!==null?(l=_.tail,_.rendering=l,_.tail=l.sibling,_.renderingStartTime=Ot(),l.sibling=null,f=vt.current,st(vt,m?f&1|2:f&1),l):(tr(l),null);case 22:case 23:return Cm(),m=l.memoizedState!==null,a!==null&&a.memoizedState!==null!==m&&(l.flags|=8192),m&&(l.mode&1)!==0?(Cr&1073741824)!==0&&(tr(l),l.subtreeFlags&6&&(l.flags|=8192)):tr(l),null;case 24:return null;case 25:return null}throw Error(r(156,l.tag))}function CL(a,l){switch(Lp(l),l.tag){case 1:return yr(l.type)&&Ic(),a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 3:return Sa(),pt(mr),pt(Zt),Qp(),a=l.flags,(a&65536)!==0&&(a&128)===0?(l.flags=a&-65537|128,l):null;case 5:return Gp(l),null;case 13:if(pt(vt),a=l.memoizedState,a!==null&&a.dehydrated!==null){if(l.alternate===null)throw Error(r(340));ba()}return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 19:return pt(vt),null;case 4:return Sa(),null;case 10:return Hp(l.type._context),null;case 22:case 23:return Cm(),null;case 24:return null;default:return null}}var tf=!1,rr=!1,kL=typeof WeakSet=="function"?WeakSet:Set,ve=null;function Ea(a,l){var f=a.ref;if(f!==null)if(typeof f=="function")try{f(null)}catch(m){xt(a,l,m)}else f.current=null}function gm(a,l,f){try{f()}catch(m){xt(a,l,m)}}var zS=!1;function jL(a,l){if(Cp=xc,a=x_(),xp(a)){if("selectionStart"in a)var f={start:a.selectionStart,end:a.selectionEnd};else e:{f=(f=a.ownerDocument)&&f.defaultView||window;var m=f.getSelection&&f.getSelection();if(m&&m.rangeCount!==0){f=m.anchorNode;var g=m.anchorOffset,_=m.focusNode;m=m.focusOffset;try{f.nodeType,_.nodeType}catch{f=null;break e}var k=0,M=-1,D=-1,ee=0,se=0,ue=a,ae=null;t:for(;;){for(var me;ue!==f||g!==0&&ue.nodeType!==3||(M=k+g),ue!==_||m!==0&&ue.nodeType!==3||(D=k+m),ue.nodeType===3&&(k+=ue.nodeValue.length),(me=ue.firstChild)!==null;)ae=ue,ue=me;for(;;){if(ue===a)break t;if(ae===f&&++ee===g&&(M=k),ae===_&&++se===m&&(D=k),(me=ue.nextSibling)!==null)break;ue=ae,ae=ue.parentNode}ue=me}f=M===-1||D===-1?null:{start:M,end:D}}else f=null}f=f||{start:0,end:0}}else f=null;for(kp={focusedElem:a,selectionRange:f},xc=!1,ve=l;ve!==null;)if(l=ve,a=l.child,(l.subtreeFlags&1028)!==0&&a!==null)a.return=l,ve=a;else for(;ve!==null;){l=ve;try{var xe=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var Oe=xe.memoizedProps,Et=xe.memoizedState,X=l.stateNode,U=X.getSnapshotBeforeUpdate(l.elementType===l.type?Oe:nn(l.type,Oe),Et);X.__reactInternalSnapshotBeforeUpdate=U}break;case 3:var J=l.stateNode.containerInfo;J.nodeType===1?J.textContent="":J.nodeType===9&&J.documentElement&&J.removeChild(J.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ce){xt(l,l.return,ce)}if(a=l.sibling,a!==null){a.return=l.return,ve=a;break}ve=l.return}return xe=zS,zS=!1,xe}function vl(a,l,f){var m=l.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var g=m=m.next;do{if((g.tag&a)===a){var _=g.destroy;g.destroy=void 0,_!==void 0&&gm(l,f,_)}g=g.next}while(g!==m)}}function rf(a,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var f=l=l.next;do{if((f.tag&a)===a){var m=f.create;f.destroy=m()}f=f.next}while(f!==l)}}function vm(a){var l=a.ref;if(l!==null){var f=a.stateNode;switch(a.tag){case 5:a=f;break;default:a=f}typeof l=="function"?l(a):l.current=a}}function HS(a){var l=a.alternate;l!==null&&(a.alternate=null,HS(l)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(l=a.stateNode,l!==null&&(delete l[yn],delete l[sl],delete l[Mp],delete l[hL],delete l[pL])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function WS(a){return a.tag===5||a.tag===3||a.tag===4}function VS(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||WS(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function bm(a,l,f){var m=a.tag;if(m===5||m===6)a=a.stateNode,l?f.nodeType===8?f.parentNode.insertBefore(a,l):f.insertBefore(a,l):(f.nodeType===8?(l=f.parentNode,l.insertBefore(a,f)):(l=f,l.appendChild(a)),f=f._reactRootContainer,f!=null||l.onclick!==null||(l.onclick=Nc));else if(m!==4&&(a=a.child,a!==null))for(bm(a,l,f),a=a.sibling;a!==null;)bm(a,l,f),a=a.sibling}function wm(a,l,f){var m=a.tag;if(m===5||m===6)a=a.stateNode,l?f.insertBefore(a,l):f.appendChild(a);else if(m!==4&&(a=a.child,a!==null))for(wm(a,l,f),a=a.sibling;a!==null;)wm(a,l,f),a=a.sibling}var Xt=null,on=!1;function bi(a,l,f){for(f=f.child;f!==null;)KS(a,l,f),f=f.sibling}function KS(a,l,f){if(mn&&typeof mn.onCommitFiberUnmount=="function")try{mn.onCommitFiberUnmount(mc,f)}catch{}switch(f.tag){case 5:rr||Ea(f,l);case 6:var m=Xt,g=on;Xt=null,bi(a,l,f),Xt=m,on=g,Xt!==null&&(on?(a=Xt,f=f.stateNode,a.nodeType===8?a.parentNode.removeChild(f):a.removeChild(f)):Xt.removeChild(f.stateNode));break;case 18:Xt!==null&&(on?(a=Xt,f=f.stateNode,a.nodeType===8?Np(a.parentNode,f):a.nodeType===1&&Np(a,f),Ys(a)):Np(Xt,f.stateNode));break;case 4:m=Xt,g=on,Xt=f.stateNode.containerInfo,on=!0,bi(a,l,f),Xt=m,on=g;break;case 0:case 11:case 14:case 15:if(!rr&&(m=f.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){g=m=m.next;do{var _=g,k=_.destroy;_=_.tag,k!==void 0&&((_&2)!==0||(_&4)!==0)&&gm(f,l,k),g=g.next}while(g!==m)}bi(a,l,f);break;case 1:if(!rr&&(Ea(f,l),m=f.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=f.memoizedProps,m.state=f.memoizedState,m.componentWillUnmount()}catch(M){xt(f,l,M)}bi(a,l,f);break;case 21:bi(a,l,f);break;case 22:f.mode&1?(rr=(m=rr)||f.memoizedState!==null,bi(a,l,f),rr=m):bi(a,l,f);break;default:bi(a,l,f)}}function XS(a){var l=a.updateQueue;if(l!==null){a.updateQueue=null;var f=a.stateNode;f===null&&(f=a.stateNode=new kL),l.forEach(function(m){var g=FL.bind(null,a,m);f.has(m)||(f.add(m),m.then(g,g))})}}function an(a,l){var f=l.deletions;if(f!==null)for(var m=0;mg&&(g=k),m&=~_}if(m=g,m=Ot()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*NL(m/1960))-m,10a?16:a,xi===null)var m=!1;else{if(a=xi,xi=null,lf=0,(Ve&6)!==0)throw Error(r(331));var g=Ve;for(Ve|=4,ve=a.current;ve!==null;){var _=ve,k=_.child;if((ve.flags&16)!==0){var M=_.deletions;if(M!==null){for(var D=0;DOt()-Sm?fo(a,0):_m|=f),br(a,l)}function sO(a,l){l===0&&((a.mode&1)===0?l=1:(l=gc,gc<<=1,(gc&130023424)===0&&(gc=4194304)));var f=ur();a=$n(a,l),a!==null&&(Ws(a,l,f),br(a,f))}function BL(a){var l=a.memoizedState,f=0;l!==null&&(f=l.retryLane),sO(a,f)}function FL(a,l){var f=0;switch(a.tag){case 13:var m=a.stateNode,g=a.memoizedState;g!==null&&(f=g.retryLane);break;case 19:m=a.stateNode;break;default:throw Error(r(314))}m!==null&&m.delete(l),sO(a,f)}var lO;lO=function(a,l,f){if(a!==null)if(a.memoizedProps!==l.pendingProps||mr.current)gr=!0;else{if((a.lanes&f)===0&&(l.flags&128)===0)return gr=!1,PL(a,l,f);gr=(a.flags&131072)!==0}else gr=!1,yt&&(l.flags&1048576)!==0&&q_(l,Bc,l.index);switch(l.lanes=0,l.tag){case 2:var m=l.type;ef(a,l),a=l.pendingProps;var g=ya(l,Zt.current);_a(l,f),g=em(null,l,m,a,g,f);var _=tm();return l.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,yr(m)?(_=!0,$c(l)):_=!1,l.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Kp(l),g.updater=Jc,l.stateNode=g,g._reactInternals=l,sm(l,m,a,f),l=fm(null,l,m,!0,_,f)):(l.tag=0,yt&&_&&Dp(l),lr(null,l,g,f),l=l.child),l;case 16:m=l.elementType;e:{switch(ef(a,l),a=l.pendingProps,g=m._init,m=g(m._payload),l.type=m,g=l.tag=UL(m),a=nn(m,a),g){case 0:l=cm(null,l,m,a,f);break e;case 1:l=MS(null,l,m,a,f);break e;case 11:l=CS(null,l,m,a,f);break e;case 14:l=kS(null,l,m,nn(m.type,a),f);break e}throw Error(r(306,m,""))}return l;case 0:return m=l.type,g=l.pendingProps,g=l.elementType===m?g:nn(m,g),cm(a,l,m,g,f);case 1:return m=l.type,g=l.pendingProps,g=l.elementType===m?g:nn(m,g),MS(a,l,m,g,f);case 3:e:{if(IS(l),a===null)throw Error(r(387));m=l.pendingProps,_=l.memoizedState,g=_.element,Y_(a,l),Wc(l,m,null,f);var k=l.memoizedState;if(m=k.element,_.isDehydrated)if(_={element:m,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},l.updateQueue.baseState=_,l.memoizedState=_,l.flags&256){g=Oa(Error(r(423)),l),l=$S(a,l,m,f,g);break e}else if(m!==g){g=Oa(Error(r(424)),l),l=$S(a,l,m,f,g);break e}else for(Tr=hi(l.stateNode.containerInfo.firstChild),Pr=l,yt=!0,rn=null,f=X_(l,null,m,f),l.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(ba(),m===g){l=Ln(a,l,f);break e}lr(a,l,m,f)}l=l.child}return l;case 5:return Z_(l),a===null&&Fp(l),m=l.type,g=l.pendingProps,_=a!==null?a.memoizedProps:null,k=g.children,jp(m,g)?k=null:_!==null&&jp(m,_)&&(l.flags|=32),NS(a,l),lr(a,l,k,f),l.child;case 6:return a===null&&Fp(l),null;case 13:return DS(a,l,f);case 4:return Xp(l,l.stateNode.containerInfo),m=l.pendingProps,a===null?l.child=wa(l,null,m,f):lr(a,l,m,f),l.child;case 11:return m=l.type,g=l.pendingProps,g=l.elementType===m?g:nn(m,g),CS(a,l,m,g,f);case 7:return lr(a,l,l.pendingProps,f),l.child;case 8:return lr(a,l,l.pendingProps.children,f),l.child;case 12:return lr(a,l,l.pendingProps.children,f),l.child;case 10:e:{if(m=l.type._context,g=l.pendingProps,_=l.memoizedProps,k=g.value,st(Uc,m._currentValue),m._currentValue=k,_!==null)if(tn(_.value,k)){if(_.children===g.children&&!mr.current){l=Ln(a,l,f);break e}}else for(_=l.child,_!==null&&(_.return=l);_!==null;){var M=_.dependencies;if(M!==null){k=_.child;for(var D=M.firstContext;D!==null;){if(D.context===m){if(_.tag===1){D=Dn(-1,f&-f),D.tag=2;var ee=_.updateQueue;if(ee!==null){ee=ee.shared;var se=ee.pending;se===null?D.next=D:(D.next=se.next,se.next=D),ee.pending=D}}_.lanes|=f,D=_.alternate,D!==null&&(D.lanes|=f),Wp(_.return,f,l),M.lanes|=f;break}D=D.next}}else if(_.tag===10)k=_.type===l.type?null:_.child;else if(_.tag===18){if(k=_.return,k===null)throw Error(r(341));k.lanes|=f,M=k.alternate,M!==null&&(M.lanes|=f),Wp(k,f,l),k=_.sibling}else k=_.child;if(k!==null)k.return=_;else for(k=_;k!==null;){if(k===l){k=null;break}if(_=k.sibling,_!==null){_.return=k.return,k=_;break}k=k.return}_=k}lr(a,l,g.children,f),l=l.child}return l;case 9:return g=l.type,m=l.pendingProps.children,_a(l,f),g=$r(g),m=m(g),l.flags|=1,lr(a,l,m,f),l.child;case 14:return m=l.type,g=nn(m,l.pendingProps),g=nn(m.type,g),kS(a,l,m,g,f);case 15:return jS(a,l,l.type,l.pendingProps,f);case 17:return m=l.type,g=l.pendingProps,g=l.elementType===m?g:nn(m,g),ef(a,l),l.tag=1,yr(m)?(a=!0,$c(l)):a=!1,_a(l,f),_S(l,m,g),sm(l,m,g,f),fm(null,l,m,!0,a,f);case 19:return BS(a,l,f);case 22:return RS(a,l,f)}throw Error(r(156,l.tag))};function uO(a,l){return U1(a,l)}function qL(a,l,f,m){this.tag=a,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Br(a,l,f,m){return new qL(a,l,f,m)}function jm(a){return a=a.prototype,!(!a||!a.isReactComponent)}function UL(a){if(typeof a=="function")return jm(a)?1:0;if(a!=null){if(a=a.$$typeof,a===L)return 11;if(a===Q)return 14}return 2}function Oi(a,l){var f=a.alternate;return f===null?(f=Br(a.tag,l,a.key,a.mode),f.elementType=a.elementType,f.type=a.type,f.stateNode=a.stateNode,f.alternate=a,a.alternate=f):(f.pendingProps=l,f.type=a.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=a.flags&14680064,f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,l=a.dependencies,f.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},f.sibling=a.sibling,f.index=a.index,f.ref=a.ref,f}function df(a,l,f,m,g,_){var k=2;if(m=a,typeof a=="function")jm(a)&&(k=1);else if(typeof a=="string")k=5;else e:switch(a){case j:return po(f.children,g,_,l);case R:k=8,g|=8;break;case N:return a=Br(12,f,l,g|2),a.elementType=N,a.lanes=_,a;case K:return a=Br(13,f,l,g),a.elementType=K,a.lanes=_,a;case Y:return a=Br(19,f,l,g),a.elementType=Y,a.lanes=_,a;case te:return hf(f,g,_,l);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case V:k=10;break e;case q:k=9;break e;case L:k=11;break e;case Q:k=14;break e;case Z:k=16,m=null;break e}throw Error(r(130,a==null?a:typeof a,""))}return l=Br(k,f,l,g),l.elementType=a,l.type=m,l.lanes=_,l}function po(a,l,f,m){return a=Br(7,a,m,l),a.lanes=f,a}function hf(a,l,f,m){return a=Br(22,a,m,l),a.elementType=te,a.lanes=f,a.stateNode={isHidden:!1},a}function Rm(a,l,f){return a=Br(6,a,null,l),a.lanes=f,a}function Nm(a,l,f){return l=Br(4,a.children!==null?a.children:[],a.key,l),l.lanes=f,l.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},l}function zL(a,l,f,m,g){this.tag=l,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ap(0),this.expirationTimes=ap(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ap(0),this.identifierPrefix=m,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Mm(a,l,f,m,g,_,k,M,D){return a=new zL(a,l,f,M,D),l===1?(l=1,_===!0&&(l|=8)):l=0,_=Br(3,null,null,l),a.current=_,_.stateNode=a,_.memoizedState={element:m,isDehydrated:f,cache:null,transitions:null,pendingSuspenseBoundaries:null},Kp(_),a}function HL(a,l,f){var m=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),qm.exports=oB(),qm.exports}var OO;function aB(){if(OO)return _f;OO=1;var e=V2();return _f.createRoot=e.createRoot,_f.hydrateRoot=e.hydrateRoot,_f}var sB=aB();const lB=tt(sB),uB=20,cB=1e6,Vn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Hm=0;function fB(){return Hm=(Hm+1)%Number.MAX_VALUE,Hm.toString()}const Wm=new Map,EO=e=>{if(Wm.has(e))return;const t=setTimeout(()=>{Wm.delete(e),Vl({type:Vn.REMOVE_TOAST,toastId:e})},cB);Wm.set(e,t)},dB=(e,t)=>{switch(t.type){case Vn.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,uB)};case Vn.UPDATE_TOAST:return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case Vn.DISMISS_TOAST:{const{toastId:r}=t;return r?EO(r):e.toasts.forEach(n=>{EO(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case Vn.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Hf=[];let Wf={toasts:[]};function Vl(e){Wf=dB(Wf,e),Hf.forEach(t=>{t(Wf)})}function hB({...e}){const t=fB(),r=i=>Vl({type:Vn.UPDATE_TOAST,toast:{...i,id:t}}),n=()=>Vl({type:Vn.DISMISS_TOAST,toastId:t});return Vl({type:Vn.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:i=>{i||n()}}}),{id:t,dismiss:n,update:r}}function pB(){const[e,t]=$.useState(Wf);return $.useEffect(()=>(Hf.push(t),()=>{const r=Hf.indexOf(t);r>-1&&Hf.splice(r,1)}),[e]),{...e,toast:hB,dismiss:r=>Vl({type:Vn.DISMISS_TOAST,toastId:r})}}function K2(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,PO=Be,mB=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return PO(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(d=>{const p=r==null?void 0:r[d],h=o==null?void 0:o[d];if(p===null)return null;const y=AO(p)||AO(h);return i[d][y]}),u=r&&Object.entries(r).reduce((d,p)=>{let[h,y]=p;return y===void 0||(d[h]=y),d},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,p)=>{let{class:h,className:y,...b}=p;return Object.entries(b).every(S=>{let[w,v]=S;return Array.isArray(v)?v.includes({...o,...u}[w]):{...o,...u}[w]===v})?[...d,h,y]:d},[]);return PO(e,s,c,r==null?void 0:r.class,r==null?void 0:r.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const yB=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),X2=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var gB={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vB=$.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:o,iconNode:s,...u},c)=>$.createElement("svg",{ref:c,...gB,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:X2("lucide",i),...u},[...s.map(([d,p])=>$.createElement(d,p)),...Array.isArray(o)?o:[o]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Xi=(e,t)=>{const r=$.forwardRef(({className:n,...i},o)=>$.createElement(vB,{ref:o,iconNode:t,className:X2(`lucide-${yB(e)}`,n),...i}));return r.displayName=`${e}`,r};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bB=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],wB=Xi("ArrowLeft",bB);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xB=[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]],TO=Xi("ChartNoAxesColumn",xB);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _B=[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]],SB=Xi("Coins",_B);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const OB=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],EB=Xi("DollarSign",OB);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const AB=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],PB=Xi("House",AB);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const TB=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],CB=Xi("Menu",TB);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kB=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]],jB=Xi("TrendingUp",kB);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const RB=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],sx=Xi("X",RB),NB=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n({classGroupId:e,validator:t}),G2=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),nd="-",CO=[],IB="arbitrary..",$B=e=>{const t=LB(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return DB(s);const u=s.split(nd),c=u[0]===""&&u.length>1?1:0;return Y2(u,c,t)},getConflictingClassGroupIds:(s,u)=>{if(u){const c=n[s],d=r[s];return c?d?NB(d,c):c:d||CO}return r[s]||CO}}},Y2=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],o=r.nextPart.get(i);if(o){const d=Y2(e,t+1,o);if(d)return d}const s=r.validators;if(s===null)return;const u=t===0?e.join(nd):e.slice(t).join(nd),c=s.length;for(let d=0;de.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?IB+n:void 0})(),LB=e=>{const{theme:t,classGroups:r}=e;return BB(r,t)},BB=(e,t)=>{const r=G2();for(const n in e){const i=e[n];lx(i,r,n,t)}return r},lx=(e,t,r,n)=>{const i=e.length;for(let o=0;o{if(typeof e=="string"){qB(e,t,r);return}if(typeof e=="function"){UB(e,t,r,n);return}zB(e,t,r,n)},qB=(e,t,r)=>{const n=e===""?t:Q2(t,e);n.classGroupId=r},UB=(e,t,r,n)=>{if(HB(e)){lx(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(MB(r,e))},zB=(e,t,r,n)=>{const i=Object.entries(e),o=i.length;for(let s=0;s{let r=e;const n=t.split(nd),i=n.length;for(let o=0;o"isThemeGetter"in e&&e.isThemeGetter===!0,WB=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(o,s)=>{r[o]=s,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(o){let s=r[o];if(s!==void 0)return s;if((s=n[o])!==void 0)return i(o,s),s},set(o,s){o in r?r[o]=s:i(o,s)}}},cb="!",kO=":",VB=[],jO=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),KB=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const o=[];let s=0,u=0,c=0,d;const p=i.length;for(let w=0;wc?d-c:void 0;return jO(o,b,y,S)};if(t){const i=t+kO,o=n;n=s=>s.startsWith(i)?o(s.slice(i.length)):jO(VB,!1,s,void 0,!0)}if(r){const i=n;n=o=>r({className:o,parseClassName:i})}return n},XB=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let o=0;o0&&(i.sort(),n.push(...i),i=[]),n.push(s)):i.push(s)}return i.length>0&&(i.sort(),n.push(...i)),n}},GB=e=>({cache:WB(e.cacheSize),parseClassName:KB(e),sortModifiers:XB(e),...$B(e)}),YB=/\s+/,QB=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:o}=t,s=[],u=e.trim().split(YB);let c="";for(let d=u.length-1;d>=0;d-=1){const p=u[d],{isExternal:h,modifiers:y,hasImportantModifier:b,baseClassName:S,maybePostfixModifierPosition:w}=r(p);if(h){c=p+(c.length>0?" "+c:c);continue}let v=!!w,x=n(v?S.substring(0,w):S);if(!x){if(!v){c=p+(c.length>0?" "+c:c);continue}if(x=n(S),!x){c=p+(c.length>0?" "+c:c);continue}v=!1}const O=y.length===0?"":y.length===1?y[0]:o(y).join(":"),A=b?O+cb:O,P=A+x;if(s.indexOf(P)>-1)continue;s.push(P);const E=i(x,v);for(let T=0;T0?" "+c:c)}return c},JB=(...e)=>{let t=0,r,n,i="";for(;t{if(typeof e=="string")return e;let t,r="";for(let n=0;n{let r,n,i,o;const s=c=>{const d=t.reduce((p,h)=>h(p),e());return r=GB(d),n=r.cache.get,i=r.cache.set,o=u,u(c)},u=c=>{const d=n(c);if(d)return d;const p=QB(c,r);return i(c,p),p};return o=s,(...c)=>o(JB(...c))},e3=[],It=e=>{const t=r=>r[e]||e3;return t.isThemeGetter=!0,t},Z2=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,eR=/^\((?:(\w[\w-]*):)?(.+)\)$/i,t3=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,r3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,n3=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,i3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,o3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,a3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ai=e=>t3.test(e),Fe=e=>!!e&&!Number.isNaN(Number(e)),Pi=e=>!!e&&Number.isInteger(Number(e)),Vm=e=>e.endsWith("%")&&Fe(e.slice(0,-1)),Fn=e=>r3.test(e),tR=()=>!0,s3=e=>n3.test(e)&&!i3.test(e),ux=()=>!1,l3=e=>o3.test(e),u3=e=>a3.test(e),c3=e=>!_e(e)&&!Se(e),f3=e=>Gi(e,iR,ux),_e=e=>Z2.test(e),mo=e=>Gi(e,oR,s3),RO=e=>Gi(e,b3,Fe),d3=e=>Gi(e,sR,tR),h3=e=>Gi(e,aR,ux),NO=e=>Gi(e,rR,ux),p3=e=>Gi(e,nR,u3),Sf=e=>Gi(e,lR,l3),Se=e=>eR.test(e),Ol=e=>Jo(e,oR),m3=e=>Jo(e,aR),MO=e=>Jo(e,rR),y3=e=>Jo(e,iR),g3=e=>Jo(e,nR),Of=e=>Jo(e,lR,!0),v3=e=>Jo(e,sR,!0),Gi=(e,t,r)=>{const n=Z2.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Jo=(e,t,r=!1)=>{const n=eR.exec(e);return n?n[1]?t(n[1]):r:!1},rR=e=>e==="position"||e==="percentage",nR=e=>e==="image"||e==="url",iR=e=>e==="length"||e==="size"||e==="bg-size",oR=e=>e==="length",b3=e=>e==="number",aR=e=>e==="family-name",sR=e=>e==="number"||e==="weight",lR=e=>e==="shadow",w3=()=>{const e=It("color"),t=It("font"),r=It("text"),n=It("font-weight"),i=It("tracking"),o=It("leading"),s=It("breakpoint"),u=It("container"),c=It("spacing"),d=It("radius"),p=It("shadow"),h=It("inset-shadow"),y=It("text-shadow"),b=It("drop-shadow"),S=It("blur"),w=It("perspective"),v=It("aspect"),x=It("ease"),O=It("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...P(),Se,_e],T=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],R=()=>[Se,_e,c],N=()=>[Ai,"full","auto",...R()],V=()=>[Pi,"none","subgrid",Se,_e],q=()=>["auto",{span:["full",Pi,Se,_e]},Pi,Se,_e],L=()=>[Pi,"auto",Se,_e],K=()=>["auto","min","max","fr",Se,_e],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],Z=()=>["auto",...R()],te=()=>[Ai,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],G=()=>[Ai,"screen","full","dvw","lvw","svw","min","max","fit",...R()],re=()=>[Ai,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],W=()=>[e,Se,_e],I=()=>[...P(),MO,NO,{position:[Se,_e]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],le=()=>["auto","cover","contain",y3,f3,{size:[Se,_e]}],pe=()=>[Vm,Ol,mo],he=()=>["","none","full",d,Se,_e],we=()=>["",Fe,Ol,mo],ye=()=>["solid","dashed","dotted","double"],Ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>[Fe,Vm,MO,NO],Ee=()=>["","none",S,Se,_e],Re=()=>["none",Fe,Se,_e],oe=()=>["none",Fe,Se,_e],Le=()=>[Fe,Se,_e],Ce=()=>[Ai,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fn],breakpoint:[Fn],color:[tR],container:[Fn],"drop-shadow":[Fn],ease:["in","out","in-out"],font:[c3],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fn],shadow:[Fn],spacing:["px",Fe],text:[Fn],"text-shadow":[Fn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ai,_e,Se,v]}],container:["container"],columns:[{columns:[Fe,_e,Se,u]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{"inset-s":N(),start:N()}],end:[{"inset-e":N(),end:N()}],"inset-bs":[{"inset-bs":N()}],"inset-be":[{"inset-be":N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[Pi,"auto",Se,_e]}],basis:[{basis:[Ai,"full","auto",u,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fe,Ai,"auto","initial","none",_e]}],grow:[{grow:["",Fe,Se,_e]}],shrink:[{shrink:["",Fe,Se,_e]}],order:[{order:[Pi,"first","last","none",Se,_e]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:q()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:q()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pbs:[{pbs:R()}],pbe:[{pbe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:Z()}],mx:[{mx:Z()}],my:[{my:Z()}],ms:[{ms:Z()}],me:[{me:Z()}],mbs:[{mbs:Z()}],mbe:[{mbe:Z()}],mt:[{mt:Z()}],mr:[{mr:Z()}],mb:[{mb:Z()}],ml:[{ml:Z()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:te()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...re()]}],"min-block-size":[{"min-block":["auto",...re()]}],"max-block-size":[{"max-block":["none",...re()]}],w:[{w:[u,"screen",...te()]}],"min-w":[{"min-w":[u,"screen","none",...te()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[s]},...te()]}],h:[{h:["screen","lh",...te()]}],"min-h":[{"min-h":["screen","lh","none",...te()]}],"max-h":[{"max-h":["screen","lh",...te()]}],"font-size":[{text:["base",r,Ol,mo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,v3,d3]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Vm,_e]}],"font-family":[{font:[m3,h3,t]}],"font-features":[{"font-features":[_e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Se,_e]}],"line-clamp":[{"line-clamp":[Fe,"none",Se,RO]}],leading:[{leading:[o,...R()]}],"list-image":[{"list-image":["none",Se,_e]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Se,_e]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ye(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fe,"from-font","auto",Se,mo]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[Fe,"auto",Se,_e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se,_e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Se,_e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:le()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Pi,Se,_e],radial:["",Se,_e],conic:[Pi,Se,_e]},g3,p3]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:pe()}],"gradient-via-pos":[{via:pe()}],"gradient-to-pos":[{to:pe()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:he()}],"rounded-s":[{"rounded-s":he()}],"rounded-e":[{"rounded-e":he()}],"rounded-t":[{"rounded-t":he()}],"rounded-r":[{"rounded-r":he()}],"rounded-b":[{"rounded-b":he()}],"rounded-l":[{"rounded-l":he()}],"rounded-ss":[{"rounded-ss":he()}],"rounded-se":[{"rounded-se":he()}],"rounded-ee":[{"rounded-ee":he()}],"rounded-es":[{"rounded-es":he()}],"rounded-tl":[{"rounded-tl":he()}],"rounded-tr":[{"rounded-tr":he()}],"rounded-br":[{"rounded-br":he()}],"rounded-bl":[{"rounded-bl":he()}],"border-w":[{border:we()}],"border-w-x":[{"border-x":we()}],"border-w-y":[{"border-y":we()}],"border-w-s":[{"border-s":we()}],"border-w-e":[{"border-e":we()}],"border-w-bs":[{"border-bs":we()}],"border-w-be":[{"border-be":we()}],"border-w-t":[{"border-t":we()}],"border-w-r":[{"border-r":we()}],"border-w-b":[{"border-b":we()}],"border-w-l":[{"border-l":we()}],"divide-x":[{"divide-x":we()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":we()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ye(),"hidden","none"]}],"divide-style":[{divide:[...ye(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-bs":[{"border-bs":W()}],"border-color-be":[{"border-be":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...ye(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fe,Se,_e]}],"outline-w":[{outline:["",Fe,Ol,mo]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",p,Of,Sf]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",h,Of,Sf]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:we()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[Fe,mo]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":we()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",y,Of,Sf]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[Fe,Se,_e]}],"mix-blend":[{"mix-blend":[...Ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ae()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Fe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[Se,_e]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[Fe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:le()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Se,_e]}],filter:[{filter:["","none",Se,_e]}],blur:[{blur:Ee()}],brightness:[{brightness:[Fe,Se,_e]}],contrast:[{contrast:[Fe,Se,_e]}],"drop-shadow":[{"drop-shadow":["","none",b,Of,Sf]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",Fe,Se,_e]}],"hue-rotate":[{"hue-rotate":[Fe,Se,_e]}],invert:[{invert:["",Fe,Se,_e]}],saturate:[{saturate:[Fe,Se,_e]}],sepia:[{sepia:["",Fe,Se,_e]}],"backdrop-filter":[{"backdrop-filter":["","none",Se,_e]}],"backdrop-blur":[{"backdrop-blur":Ee()}],"backdrop-brightness":[{"backdrop-brightness":[Fe,Se,_e]}],"backdrop-contrast":[{"backdrop-contrast":[Fe,Se,_e]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fe,Se,_e]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fe,Se,_e]}],"backdrop-invert":[{"backdrop-invert":["",Fe,Se,_e]}],"backdrop-opacity":[{"backdrop-opacity":[Fe,Se,_e]}],"backdrop-saturate":[{"backdrop-saturate":[Fe,Se,_e]}],"backdrop-sepia":[{"backdrop-sepia":["",Fe,Se,_e]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Se,_e]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Fe,"initial",Se,_e]}],ease:[{ease:["linear","initial",x,Se,_e]}],delay:[{delay:[Fe,Se,_e]}],animate:[{animate:["none",O,Se,_e]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,Se,_e]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:Re()}],"rotate-x":[{"rotate-x":Re()}],"rotate-y":[{"rotate-y":Re()}],"rotate-z":[{"rotate-z":Re()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:Le()}],"skew-x":[{"skew-x":Le()}],"skew-y":[{"skew-y":Le()}],transform:[{transform:[Se,_e,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ce()}],"translate-x":[{"translate-x":Ce()}],"translate-y":[{"translate-y":Ce()}],"translate-z":[{"translate-z":Ce()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Se,_e]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mbs":[{"scroll-mbs":R()}],"scroll-mbe":[{"scroll-mbe":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pbs":[{"scroll-pbs":R()}],"scroll-pbe":[{"scroll-pbe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Se,_e]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[Fe,Ol,mo,RO]}],stroke:[{stroke:["none",...W()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},x3=ZB(w3);function Vu(...e){return x3(Be(e))}const uR=$.forwardRef(({...e},t)=>C.jsx("div",{ref:t,className:"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",...e}));uR.displayName="ToastProvider";const cR=$.forwardRef(({...e},t)=>C.jsx("div",{ref:t,className:"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",...e}));cR.displayName="ToastViewport";const _3=mB("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),fR=$.forwardRef(({className:e,variant:t,...r},n)=>C.jsx("div",{ref:n,className:Vu(_3({variant:t}),e),...r}));fR.displayName="Toast";const S3=$.forwardRef(({className:e,...t},r)=>C.jsx("div",{ref:r,className:Vu("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));S3.displayName="ToastAction";const dR=$.forwardRef(({className:e,...t},r)=>C.jsx("button",{ref:r,className:Vu("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:C.jsx(sx,{className:"h-4 w-4"})}));dR.displayName="ToastClose";const hR=$.forwardRef(({className:e,...t},r)=>C.jsx("div",{ref:r,className:Vu("text-sm font-semibold",e),...t}));hR.displayName="ToastTitle";const pR=$.forwardRef(({className:e,...t},r)=>C.jsx("div",{ref:r,className:Vu("text-sm opacity-90",e),...t}));pR.displayName="ToastDescription";function O3(){const{toasts:e}=pB();return C.jsxs(uR,{children:[e.map(function({id:t,title:r,description:n,action:i,...o}){return C.jsxs(fR,{...o,children:[C.jsxs("div",{className:"grid gap-1",children:[r&&C.jsx(hR,{children:r}),n&&C.jsx(pR,{children:n})]}),i,C.jsx(dR,{})]},t)}),C.jsx(cR,{})]})}var Ku=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},E3={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ji,ox,I2,A3=(I2=class{constructor(){Ne(this,ji,E3);Ne(this,ox,!1)}setTimeoutProvider(e){ge(this,ji,e)}setTimeout(e,t){return F(this,ji).setTimeout(e,t)}clearTimeout(e){F(this,ji).clearTimeout(e)}setInterval(e,t){return F(this,ji).setInterval(e,t)}clearInterval(e){F(this,ji).clearInterval(e)}},ji=new WeakMap,ox=new WeakMap,I2),Oo=new A3;function P3(e){setTimeout(e,0)}var zo=typeof window>"u"||"Deno"in globalThis;function _r(){}function T3(e,t){return typeof e=="function"?e(t):e}function fb(e){return typeof e=="number"&&e>=0&&e!==1/0}function mR(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ui(e,t){return typeof e=="function"?e(t):e}function Hr(e,t){return typeof e=="function"?e(t):e}function IO(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:s,stale:u}=e;if(s){if(n){if(t.queryHash!==cx(s,t.options))return!1}else if(!tu(t.queryKey,s))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||o&&!o(t))}function $O(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(eu(t.options.mutationKey)!==eu(o))return!1}else if(!tu(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function cx(e,t){return((t==null?void 0:t.queryKeyHashFn)||eu)(e)}function eu(e){return JSON.stringify(e,(t,r)=>hb(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function tu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>tu(e[r],t[r])):!1}var C3=Object.prototype.hasOwnProperty;function yR(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=DO(e)&&DO(t);if(!n&&!(hb(e)&&hb(t)))return t;const o=(n?e:Object.keys(e)).length,s=n?t:Object.keys(t),u=s.length,c=n?new Array(u):{};let d=0;for(let p=0;p{Oo.setTimeout(t,e)})}function pb(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?yR(e,t):t}function j3(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function R3(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var fx=Symbol();function gR(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===fx?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function vR(e,t){return typeof e=="function"?e(...t):!!e}function N3(e,t,r){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}var jo,Ri,Ha,$2,M3=($2=class extends Ku{constructor(){super();Ne(this,jo);Ne(this,Ri);Ne(this,Ha);ge(this,Ha,t=>{if(!zo&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){F(this,Ri)||this.setEventListener(F(this,Ha))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Ri))==null||t.call(this),ge(this,Ri,void 0))}setEventListener(t){var r;ge(this,Ha,t),(r=F(this,Ri))==null||r.call(this),ge(this,Ri,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){F(this,jo)!==t&&(ge(this,jo,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof F(this,jo)=="boolean"?F(this,jo):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},jo=new WeakMap,Ri=new WeakMap,Ha=new WeakMap,$2),dx=new M3;function mb(){let e,t;const r=new Promise((i,o)=>{e=i,t=o});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var I3=P3;function $3(){let e=[],t=0,r=u=>{u()},n=u=>{u()},i=I3;const o=u=>{t?e.push(u):i(()=>{r(u)})},s=()=>{const u=e;e=[],u.length&&i(()=>{n(()=>{u.forEach(c=>{r(c)})})})};return{batch:u=>{let c;t++;try{c=u()}finally{t--,t||s()}return c},batchCalls:u=>(...c)=>{o(()=>{u(...c)})},schedule:o,setNotifyFunction:u=>{r=u},setBatchNotifyFunction:u=>{n=u},setScheduler:u=>{i=u}}}var Jt=$3(),Wa,Ni,Va,D2,D3=(D2=class extends Ku{constructor(){super();Ne(this,Wa,!0);Ne(this,Ni);Ne(this,Va);ge(this,Va,t=>{if(!zo&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){F(this,Ni)||this.setEventListener(F(this,Va))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Ni))==null||t.call(this),ge(this,Ni,void 0))}setEventListener(t){var r;ge(this,Va,t),(r=F(this,Ni))==null||r.call(this),ge(this,Ni,t(this.setOnline.bind(this)))}setOnline(t){F(this,Wa)!==t&&(ge(this,Wa,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return F(this,Wa)}},Wa=new WeakMap,Ni=new WeakMap,Va=new WeakMap,D2),id=new D3;function L3(e){return Math.min(1e3*2**e,3e4)}function bR(e){return(e??"online")==="online"?id.isOnline():!0}var yb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function wR(e){let t=!1,r=0,n;const i=mb(),o=()=>i.status!=="pending",s=w=>{var v;if(!o()){const x=new yb(w);y(x),(v=e.onCancel)==null||v.call(e,x)}},u=()=>{t=!0},c=()=>{t=!1},d=()=>dx.isFocused()&&(e.networkMode==="always"||id.isOnline())&&e.canRun(),p=()=>bR(e.networkMode)&&e.canRun(),h=w=>{o()||(n==null||n(),i.resolve(w))},y=w=>{o()||(n==null||n(),i.reject(w))},b=()=>new Promise(w=>{var v;n=x=>{(o()||d())&&w(x)},(v=e.onPause)==null||v.call(e)}).then(()=>{var w;n=void 0,o()||(w=e.onContinue)==null||w.call(e)}),S=()=>{if(o())return;let w;const v=r===0?e.initialPromise:void 0;try{w=v??e.fn()}catch(x){w=Promise.reject(x)}Promise.resolve(w).then(h).catch(x=>{var T;if(o())return;const O=e.retry??(zo?0:3),A=e.retryDelay??L3,P=typeof A=="function"?A(r,x):A,E=O===!0||typeof O=="number"&&rd()?void 0:b()).then(()=>{t?y(x):S()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(n==null||n(),i),cancelRetry:u,continueRetry:c,canStart:p,start:()=>(p()?S():b().then(S),i)}}var Ro,L2,xR=(L2=class{constructor(){Ne(this,Ro)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),fb(this.gcTime)&&ge(this,Ro,Oo.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(zo?1/0:300*1e3))}clearGcTimeout(){F(this,Ro)&&(Oo.clearTimeout(F(this,Ro)),ge(this,Ro,void 0))}},Ro=new WeakMap,L2),No,Ka,zr,Mo,zt,qu,Io,un,Un,B2,B3=(B2=class extends xR{constructor(t){super();Ne(this,un);Ne(this,No);Ne(this,Ka);Ne(this,zr);Ne(this,Mo);Ne(this,zt);Ne(this,qu);Ne(this,Io);ge(this,Io,!1),ge(this,qu,t.defaultOptions),this.setOptions(t.options),this.observers=[],ge(this,Mo,t.client),ge(this,zr,F(this,Mo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ge(this,No,FO(this.options)),this.state=t.state??F(this,No),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=F(this,zt))==null?void 0:t.promise}setOptions(t){if(this.options={...F(this,qu),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=FO(this.options);r.data!==void 0&&(this.setState(BO(r.data,r.dataUpdatedAt)),ge(this,No,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&F(this,zr).remove(this)}setData(t,r){const n=pb(this.state.data,t,this.options);return ze(this,un,Un).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){ze(this,un,Un).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=F(this,zt))==null?void 0:n.promise;return(i=F(this,zt))==null||i.cancel(t),r?r.then(_r).catch(_r):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(F(this,No))}isActive(){return this.observers.some(t=>Hr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===fx||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ui(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!mR(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=F(this,zt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=F(this,zt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),F(this,zr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(F(this,zt)&&(F(this,Io)?F(this,zt).cancel({revert:!0}):F(this,zt).cancelRetry()),this.scheduleGc()),F(this,zr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ze(this,un,Un).call(this,{type:"invalidate"})}async fetch(t,r){var c,d,p,h,y,b,S,w,v,x,O,A;if(this.state.fetchStatus!=="idle"&&((c=F(this,zt))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(F(this,zt))return F(this,zt).continueRetry(),F(this,zt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const P=this.observers.find(E=>E.options.queryFn);P&&this.setOptions(P.options)}const n=new AbortController,i=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(ge(this,Io,!0),n.signal)})},o=()=>{const P=gR(this.options,r),T=(()=>{const j={client:F(this,Mo),queryKey:this.queryKey,meta:this.meta};return i(j),j})();return ge(this,Io,!1),this.options.persister?this.options.persister(P,T,this):P(T)},u=(()=>{const P={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:F(this,Mo),state:this.state,fetchFn:o};return i(P),P})();(d=this.options.behavior)==null||d.onFetch(u,this),ge(this,Ka,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=u.fetchOptions)==null?void 0:p.meta))&&ze(this,un,Un).call(this,{type:"fetch",meta:(h=u.fetchOptions)==null?void 0:h.meta}),ge(this,zt,wR({initialPromise:r==null?void 0:r.initialPromise,fn:u.fetchFn,onCancel:P=>{P instanceof yb&&P.revert&&this.setState({...F(this,Ka),fetchStatus:"idle"}),n.abort()},onFail:(P,E)=>{ze(this,un,Un).call(this,{type:"failed",failureCount:P,error:E})},onPause:()=>{ze(this,un,Un).call(this,{type:"pause"})},onContinue:()=>{ze(this,un,Un).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const P=await F(this,zt).start();if(P===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(P),(b=(y=F(this,zr).config).onSuccess)==null||b.call(y,P,this),(w=(S=F(this,zr).config).onSettled)==null||w.call(S,P,this.state.error,this),P}catch(P){if(P instanceof yb){if(P.silent)return F(this,zt).promise;if(P.revert){if(this.state.data===void 0)throw P;return this.state.data}}throw ze(this,un,Un).call(this,{type:"error",error:P}),(x=(v=F(this,zr).config).onError)==null||x.call(v,P,this),(A=(O=F(this,zr).config).onSettled)==null||A.call(O,this.state.data,P,this),P}finally{this.scheduleGc()}}},No=new WeakMap,Ka=new WeakMap,zr=new WeakMap,Mo=new WeakMap,zt=new WeakMap,qu=new WeakMap,Io=new WeakMap,un=new WeakSet,Un=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,..._R(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...BO(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ge(this,Ka,t.manual?i:void 0),i;case"error":const o=t.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Jt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),F(this,zr).notify({query:this,type:"updated",action:t})})},B2);function _R(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:bR(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function BO(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function FO(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var xr,He,Uu,cr,$o,Xa,Hn,Mi,zu,Ga,Ya,Do,Lo,Ii,Qa,Je,Bl,gb,vb,bb,wb,xb,_b,Sb,SR,F2,F3=(F2=class extends Ku{constructor(t,r){super();Ne(this,Je);Ne(this,xr);Ne(this,He);Ne(this,Uu);Ne(this,cr);Ne(this,$o);Ne(this,Xa);Ne(this,Hn);Ne(this,Mi);Ne(this,zu);Ne(this,Ga);Ne(this,Ya);Ne(this,Do);Ne(this,Lo);Ne(this,Ii);Ne(this,Qa,new Set);this.options=r,ge(this,xr,t),ge(this,Mi,null),ge(this,Hn,mb()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(F(this,He).addObserver(this),qO(F(this,He),this.options)?ze(this,Je,Bl).call(this):this.updateResult(),ze(this,Je,wb).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ob(F(this,He),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ob(F(this,He),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ze(this,Je,xb).call(this),ze(this,Je,_b).call(this),F(this,He).removeObserver(this)}setOptions(t){const r=this.options,n=F(this,He);if(this.options=F(this,xr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Hr(this.options.enabled,F(this,He))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ze(this,Je,Sb).call(this),F(this,He).setOptions(this.options),r._defaulted&&!db(this.options,r)&&F(this,xr).getQueryCache().notify({type:"observerOptionsUpdated",query:F(this,He),observer:this});const i=this.hasListeners();i&&UO(F(this,He),n,this.options,r)&&ze(this,Je,Bl).call(this),this.updateResult(),i&&(F(this,He)!==n||Hr(this.options.enabled,F(this,He))!==Hr(r.enabled,F(this,He))||Ui(this.options.staleTime,F(this,He))!==Ui(r.staleTime,F(this,He)))&&ze(this,Je,gb).call(this);const o=ze(this,Je,vb).call(this);i&&(F(this,He)!==n||Hr(this.options.enabled,F(this,He))!==Hr(r.enabled,F(this,He))||o!==F(this,Ii))&&ze(this,Je,bb).call(this,o)}getOptimisticResult(t){const r=F(this,xr).getQueryCache().build(F(this,xr),t),n=this.createResult(r,t);return U3(this,n)&&(ge(this,cr,n),ge(this,Xa,this.options),ge(this,$o,F(this,He).state)),n}getCurrentResult(){return F(this,cr)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&F(this,Hn).status==="pending"&&F(this,Hn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){F(this,Qa).add(t)}getCurrentQuery(){return F(this,He)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=F(this,xr).defaultQueryOptions(t),n=F(this,xr).getQueryCache().build(F(this,xr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return ze(this,Je,Bl).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),F(this,cr)))}createResult(t,r){var N;const n=F(this,He),i=this.options,o=F(this,cr),s=F(this,$o),u=F(this,Xa),d=t!==n?t.state:F(this,Uu),{state:p}=t;let h={...p},y=!1,b;if(r._optimisticResults){const V=this.hasListeners(),q=!V&&qO(t,r),L=V&&UO(t,n,r,i);(q||L)&&(h={...h,..._R(p.data,t.options)}),r._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:S,errorUpdatedAt:w,status:v}=h;b=h.data;let x=!1;if(r.placeholderData!==void 0&&b===void 0&&v==="pending"){let V;o!=null&&o.isPlaceholderData&&r.placeholderData===(u==null?void 0:u.placeholderData)?(V=o.data,x=!0):V=typeof r.placeholderData=="function"?r.placeholderData((N=F(this,Ya))==null?void 0:N.state.data,F(this,Ya)):r.placeholderData,V!==void 0&&(v="success",b=pb(o==null?void 0:o.data,V,r),y=!0)}if(r.select&&b!==void 0&&!x)if(o&&b===(s==null?void 0:s.data)&&r.select===F(this,zu))b=F(this,Ga);else try{ge(this,zu,r.select),b=r.select(b),b=pb(o==null?void 0:o.data,b,r),ge(this,Ga,b),ge(this,Mi,null)}catch(V){ge(this,Mi,V)}F(this,Mi)&&(S=F(this,Mi),b=F(this,Ga),w=Date.now(),v="error");const O=h.fetchStatus==="fetching",A=v==="pending",P=v==="error",E=A&&O,T=b!==void 0,R={status:v,fetchStatus:h.fetchStatus,isPending:A,isSuccess:v==="success",isError:P,isInitialLoading:E,isLoading:E,data:b,dataUpdatedAt:h.dataUpdatedAt,error:S,errorUpdatedAt:w,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>d.dataUpdateCount||h.errorUpdateCount>d.errorUpdateCount,isFetching:O,isRefetching:O&&!A,isLoadingError:P&&!T,isPaused:h.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:P&&T,isStale:hx(t,r),refetch:this.refetch,promise:F(this,Hn),isEnabled:Hr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const V=R.data!==void 0,q=R.status==="error"&&!V,L=Q=>{q?Q.reject(R.error):V&&Q.resolve(R.data)},K=()=>{const Q=ge(this,Hn,R.promise=mb());L(Q)},Y=F(this,Hn);switch(Y.status){case"pending":t.queryHash===n.queryHash&&L(Y);break;case"fulfilled":(q||R.data!==Y.value)&&K();break;case"rejected":(!q||R.error!==Y.reason)&&K();break}}return R}updateResult(){const t=F(this,cr),r=this.createResult(F(this,He),this.options);if(ge(this,$o,F(this,He).state),ge(this,Xa,this.options),F(this,$o).data!==void 0&&ge(this,Ya,F(this,He)),db(r,t))return;ge(this,cr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!F(this,Qa).size)return!0;const s=new Set(o??F(this,Qa));return this.options.throwOnError&&s.add("error"),Object.keys(F(this,cr)).some(u=>{const c=u;return F(this,cr)[c]!==t[c]&&s.has(c)})};ze(this,Je,SR).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ze(this,Je,wb).call(this)}},xr=new WeakMap,He=new WeakMap,Uu=new WeakMap,cr=new WeakMap,$o=new WeakMap,Xa=new WeakMap,Hn=new WeakMap,Mi=new WeakMap,zu=new WeakMap,Ga=new WeakMap,Ya=new WeakMap,Do=new WeakMap,Lo=new WeakMap,Ii=new WeakMap,Qa=new WeakMap,Je=new WeakSet,Bl=function(t){ze(this,Je,Sb).call(this);let r=F(this,He).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(_r)),r},gb=function(){ze(this,Je,xb).call(this);const t=Ui(this.options.staleTime,F(this,He));if(zo||F(this,cr).isStale||!fb(t))return;const n=mR(F(this,cr).dataUpdatedAt,t)+1;ge(this,Do,Oo.setTimeout(()=>{F(this,cr).isStale||this.updateResult()},n))},vb=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(F(this,He)):this.options.refetchInterval)??!1},bb=function(t){ze(this,Je,_b).call(this),ge(this,Ii,t),!(zo||Hr(this.options.enabled,F(this,He))===!1||!fb(F(this,Ii))||F(this,Ii)===0)&&ge(this,Lo,Oo.setInterval(()=>{(this.options.refetchIntervalInBackground||dx.isFocused())&&ze(this,Je,Bl).call(this)},F(this,Ii)))},wb=function(){ze(this,Je,gb).call(this),ze(this,Je,bb).call(this,ze(this,Je,vb).call(this))},xb=function(){F(this,Do)&&(Oo.clearTimeout(F(this,Do)),ge(this,Do,void 0))},_b=function(){F(this,Lo)&&(Oo.clearInterval(F(this,Lo)),ge(this,Lo,void 0))},Sb=function(){const t=F(this,xr).getQueryCache().build(F(this,xr),this.options);if(t===F(this,He))return;const r=F(this,He);ge(this,He,t),ge(this,Uu,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},SR=function(t){Jt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(F(this,cr))}),F(this,xr).getQueryCache().notify({query:F(this,He),type:"observerResultsUpdated"})})},F2);function q3(e,t){return Hr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function qO(e,t){return q3(e,t)||e.state.data!==void 0&&Ob(e,t,t.refetchOnMount)}function Ob(e,t,r){if(Hr(t.enabled,e)!==!1&&Ui(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&hx(e,t)}return!1}function UO(e,t,r,n){return(e!==t||Hr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&hx(e,r)}function hx(e,t){return Hr(t.enabled,e)!==!1&&e.isStaleByTime(Ui(t.staleTime,e))}function U3(e,t){return!db(e.getCurrentResult(),t)}function zO(e){return{onFetch:(t,r)=>{var p,h,y,b,S;const n=t.options,i=(y=(h=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:h.fetchMore)==null?void 0:y.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],s=((S=t.state.data)==null?void 0:S.pageParams)||[];let u={pages:[],pageParams:[]},c=0;const d=async()=>{let w=!1;const v=A=>{N3(A,()=>t.signal,()=>w=!0)},x=gR(t.options,t.fetchOptions),O=async(A,P,E)=>{if(w)return Promise.reject();if(P==null&&A.pages.length)return Promise.resolve(A);const j=(()=>{const q={client:t.client,queryKey:t.queryKey,pageParam:P,direction:E?"backward":"forward",meta:t.options.meta};return v(q),q})(),R=await x(j),{maxPages:N}=t.options,V=E?R3:j3;return{pages:V(A.pages,R,N),pageParams:V(A.pageParams,P,N)}};if(i&&o.length){const A=i==="backward",P=A?z3:HO,E={pages:o,pageParams:s},T=P(n,E);u=await O(E,T,A)}else{const A=e??o.length;do{const P=c===0?s[0]??n.initialPageParam:HO(n,u);if(c>0&&P==null)break;u=await O(u,P),c++}while(c{var w,v;return(v=(w=t.options).persister)==null?void 0:v.call(w,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function HO(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function z3(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Hu,wn,ir,Bo,xn,Ti,q2,H3=(q2=class extends xR{constructor(t){super();Ne(this,xn);Ne(this,Hu);Ne(this,wn);Ne(this,ir);Ne(this,Bo);ge(this,Hu,t.client),this.mutationId=t.mutationId,ge(this,ir,t.mutationCache),ge(this,wn,[]),this.state=t.state||W3(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){F(this,wn).includes(t)||(F(this,wn).push(t),this.clearGcTimeout(),F(this,ir).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ge(this,wn,F(this,wn).filter(r=>r!==t)),this.scheduleGc(),F(this,ir).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){F(this,wn).length||(this.state.status==="pending"?this.scheduleGc():F(this,ir).remove(this))}continue(){var t;return((t=F(this,Bo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,u,c,d,p,h,y,b,S,w,v,x,O,A,P,E,T,j;const r=()=>{ze(this,xn,Ti).call(this,{type:"continue"})},n={client:F(this,Hu),meta:this.options.meta,mutationKey:this.options.mutationKey};ge(this,Bo,wR({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(R,N)=>{ze(this,xn,Ti).call(this,{type:"failed",failureCount:R,error:N})},onPause:()=>{ze(this,xn,Ti).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>F(this,ir).canRun(this)}));const i=this.state.status==="pending",o=!F(this,Bo).canStart();try{if(i)r();else{ze(this,xn,Ti).call(this,{type:"pending",variables:t,isPaused:o}),F(this,ir).config.onMutate&&await F(this,ir).config.onMutate(t,this,n);const N=await((u=(s=this.options).onMutate)==null?void 0:u.call(s,t,n));N!==this.state.context&&ze(this,xn,Ti).call(this,{type:"pending",context:N,variables:t,isPaused:o})}const R=await F(this,Bo).start();return await((d=(c=F(this,ir).config).onSuccess)==null?void 0:d.call(c,R,t,this.state.context,this,n)),await((h=(p=this.options).onSuccess)==null?void 0:h.call(p,R,t,this.state.context,n)),await((b=(y=F(this,ir).config).onSettled)==null?void 0:b.call(y,R,null,this.state.variables,this.state.context,this,n)),await((w=(S=this.options).onSettled)==null?void 0:w.call(S,R,null,t,this.state.context,n)),ze(this,xn,Ti).call(this,{type:"success",data:R}),R}catch(R){try{await((x=(v=F(this,ir).config).onError)==null?void 0:x.call(v,R,t,this.state.context,this,n))}catch(N){Promise.reject(N)}try{await((A=(O=this.options).onError)==null?void 0:A.call(O,R,t,this.state.context,n))}catch(N){Promise.reject(N)}try{await((E=(P=F(this,ir).config).onSettled)==null?void 0:E.call(P,void 0,R,this.state.variables,this.state.context,this,n))}catch(N){Promise.reject(N)}try{await((j=(T=this.options).onSettled)==null?void 0:j.call(T,void 0,R,t,this.state.context,n))}catch(N){Promise.reject(N)}throw ze(this,xn,Ti).call(this,{type:"error",error:R}),R}finally{F(this,ir).runNext(this)}}},Hu=new WeakMap,wn=new WeakMap,ir=new WeakMap,Bo=new WeakMap,xn=new WeakSet,Ti=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Jt.batch(()=>{F(this,wn).forEach(n=>{n.onMutationUpdate(t)}),F(this,ir).notify({mutation:this,type:"updated",action:t})})},q2);function W3(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Wn,cn,Wu,U2,V3=(U2=class extends Ku{constructor(t={}){super();Ne(this,Wn);Ne(this,cn);Ne(this,Wu);this.config=t,ge(this,Wn,new Set),ge(this,cn,new Map),ge(this,Wu,0)}build(t,r,n){const i=new H3({client:t,mutationCache:this,mutationId:++wf(this,Wu)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){F(this,Wn).add(t);const r=Ef(t);if(typeof r=="string"){const n=F(this,cn).get(r);n?n.push(t):F(this,cn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(F(this,Wn).delete(t)){const r=Ef(t);if(typeof r=="string"){const n=F(this,cn).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&F(this,cn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Ef(t);if(typeof r=="string"){const n=F(this,cn).get(r),i=n==null?void 0:n.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=Ef(t);if(typeof r=="string"){const i=(n=F(this,cn).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Jt.batch(()=>{F(this,Wn).forEach(t=>{this.notify({type:"removed",mutation:t})}),F(this,Wn).clear(),F(this,cn).clear()})}getAll(){return Array.from(F(this,Wn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>$O(r,n))}findAll(t={}){return this.getAll().filter(r=>$O(t,r))}notify(t){Jt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Jt.batch(()=>Promise.all(t.map(r=>r.continue().catch(_r))))}},Wn=new WeakMap,cn=new WeakMap,Wu=new WeakMap,U2);function Ef(e){var t;return(t=e.options.scope)==null?void 0:t.id}var _n,z2,K3=(z2=class extends Ku{constructor(t={}){super();Ne(this,_n);this.config=t,ge(this,_n,new Map)}build(t,r,n){const i=r.queryKey,o=r.queryHash??cx(i,r);let s=this.get(o);return s||(s=new B3({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){F(this,_n).has(t.queryHash)||(F(this,_n).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=F(this,_n).get(t.queryHash);r&&(t.destroy(),r===t&&F(this,_n).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Jt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return F(this,_n).get(t)}getAll(){return[...F(this,_n).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>IO(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>IO(t,n)):r}notify(t){Jt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Jt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Jt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},_n=new WeakMap,z2),_t,$i,Di,Ja,Za,Li,es,ts,H2,X3=(H2=class{constructor(e={}){Ne(this,_t);Ne(this,$i);Ne(this,Di);Ne(this,Ja);Ne(this,Za);Ne(this,Li);Ne(this,es);Ne(this,ts);ge(this,_t,e.queryCache||new K3),ge(this,$i,e.mutationCache||new V3),ge(this,Di,e.defaultOptions||{}),ge(this,Ja,new Map),ge(this,Za,new Map),ge(this,Li,0)}mount(){wf(this,Li)._++,F(this,Li)===1&&(ge(this,es,dx.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,_t).onFocus())})),ge(this,ts,id.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,_t).onOnline())})))}unmount(){var e,t;wf(this,Li)._--,F(this,Li)===0&&((e=F(this,es))==null||e.call(this),ge(this,es,void 0),(t=F(this,ts))==null||t.call(this),ge(this,ts,void 0))}isFetching(e){return F(this,_t).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return F(this,$i).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=F(this,_t).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=F(this,_t).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Ui(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return F(this,_t).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=F(this,_t).get(n.queryHash),o=i==null?void 0:i.state.data,s=T3(t,o);if(s!==void 0)return F(this,_t).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Jt.batch(()=>F(this,_t).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=F(this,_t).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=F(this,_t);Jt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=F(this,_t);return Jt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Jt.batch(()=>F(this,_t).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(_r).catch(_r)}invalidateQueries(e,t={}){return Jt.batch(()=>(F(this,_t).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Jt.batch(()=>F(this,_t).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch(_r)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(_r)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=F(this,_t).build(this,t);return r.isStaleByTime(Ui(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(_r).catch(_r)}fetchInfiniteQuery(e){return e.behavior=zO(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(_r).catch(_r)}ensureInfiniteQueryData(e){return e.behavior=zO(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return id.isOnline()?F(this,$i).resumePausedMutations():Promise.resolve()}getQueryCache(){return F(this,_t)}getMutationCache(){return F(this,$i)}getDefaultOptions(){return F(this,Di)}setDefaultOptions(e){ge(this,Di,e)}setQueryDefaults(e,t){F(this,Ja).set(eu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...F(this,Ja).values()],r={};return t.forEach(n=>{tu(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){F(this,Za).set(eu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...F(this,Za).values()],r={};return t.forEach(n=>{tu(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...F(this,Di).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=cx(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===fx&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...F(this,Di).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){F(this,_t).clear(),F(this,$i).clear()}},_t=new WeakMap,$i=new WeakMap,Di=new WeakMap,Ja=new WeakMap,Za=new WeakMap,Li=new WeakMap,es=new WeakMap,ts=new WeakMap,H2),OR=$.createContext(void 0),G3=e=>{const t=$.useContext(OR);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Y3=({client:e,children:t})=>($.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),C.jsx(OR.Provider,{value:e,children:t})),ER=$.createContext(!1),Q3=()=>$.useContext(ER);ER.Provider;function J3(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Z3=$.createContext(J3()),e4=()=>$.useContext(Z3),t4=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?vR(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},r4=e=>{$.useEffect(()=>{e.clearReset()},[e])},n4=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||vR(r,[e.error,n])),i4=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},o4=(e,t)=>e.isLoading&&e.isFetching&&!t,a4=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,WO=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function s4(e,t,r){var y,b,S,w;const n=Q3(),i=e4(),o=G3(),s=o.defaultQueryOptions(e);(b=(y=o.getDefaultOptions().queries)==null?void 0:y._experimental_beforeQuery)==null||b.call(y,s);const u=o.getQueryCache().get(s.queryHash);s._optimisticResults=n?"isRestoring":"optimistic",i4(s),t4(s,i,u),r4(i);const c=!o.getQueryCache().get(s.queryHash),[d]=$.useState(()=>new t(o,s)),p=d.getOptimisticResult(s),h=!n&&e.subscribed!==!1;if($.useSyncExternalStore($.useCallback(v=>{const x=h?d.subscribe(Jt.batchCalls(v)):_r;return d.updateResult(),x},[d,h]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),$.useEffect(()=>{d.setOptions(s)},[s,d]),a4(s,p))throw WO(s,d,i);if(n4({result:p,errorResetBoundary:i,throwOnError:s.throwOnError,query:u,suspense:s.suspense}))throw p.error;if((w=(S=o.getDefaultOptions().queries)==null?void 0:S._experimental_afterQuery)==null||w.call(S,s,p),s.experimental_prefetchInRender&&!zo&&o4(p,n)){const v=c?WO(s,d,i):u==null?void 0:u.promise;v==null||v.catch(_r).finally(()=>{d.updateResult()})}return s.notifyOnChangeProps?p:d.trackResult(p)}function l4(e,t){return s4(e,F3)}const u4=new X3({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});V2();/** * @remix-run/router v1.23.2 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function ru(){return ru=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function px(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function f4(){return Math.random().toString(36).substr(2,8)}function KO(e,t){return{usr:e.state,key:e.key,idx:t}}function Eb(e,t,r,n){return r===void 0&&(r=null),ru({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?As(t):t,{state:r,key:t&&t.key||n||f4()})}function od(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function As(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function d4(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,s=i.history,u=Bi.Pop,c=null,d=p();d==null&&(d=0,s.replaceState(ru({},s.state,{idx:d}),""));function p(){return(s.state||{idx:null}).idx}function h(){u=Bi.Pop;let v=p(),x=v==null?null:v-d;d=v,c&&c({action:u,location:w.location,delta:x})}function y(v,x){u=Bi.Push;let O=Eb(w.location,v,x);d=p()+1;let A=KO(O,d),P=w.createHref(O);try{s.pushState(A,"",P)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(P)}o&&c&&c({action:u,location:w.location,delta:1})}function b(v,x){u=Bi.Replace;let O=Eb(w.location,v,x);d=p();let A=KO(O,d),P=w.createHref(O);s.replaceState(A,"",P),o&&c&&c({action:u,location:w.location,delta:0})}function S(v){let x=i.location.origin!=="null"?i.location.origin:i.location.href,O=typeof v=="string"?v:od(v);return O=O.replace(/ $/,"%20"),kt(x,"No window.location.(origin|href) available to create URL for href: "+O),new URL(O,x)}let w={get action(){return u},get location(){return e(i,s)},listen(v){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(VO,h),c=v,()=>{i.removeEventListener(VO,h),c=null}},createHref(v){return t(i,v)},createURL:S,encodeLocation(v){let x=S(v);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:y,replace:b,go(v){return s.go(v)}};return w}var XO;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(XO||(XO={}));function h4(e,t,r){return r===void 0&&(r="/"),p4(e,t,r)}function p4(e,t,r,n){let i=typeof t=="string"?As(t):t,o=mx(i.pathname||"/",r);if(o==null)return null;let s=AR(e);m4(s);let u=null;for(let c=0;u==null&&c{let c={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};c.relativePath.startsWith("/")&&(kt(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let d=zi([n,c.relativePath]),p=r.concat(c);o.children&&o.children.length>0&&(kt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),AR(o.children,t,p,d)),!(o.path==null&&!o.index)&&t.push({path:d,score:_4(d,o.index),routesMeta:p})};return e.forEach((o,s)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))i(o,s);else for(let c of PR(o.path))i(o,s,c)}),t}function PR(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let s=PR(n.join("/")),u=[];return u.push(...s.map(c=>c===""?o:[o,c].join("/"))),i&&u.push(...s),u.map(c=>e.startsWith("/")&&c===""?"/":c)}function m4(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:S4(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const y4=/^:[\w-]+$/,g4=3,v4=2,b4=1,w4=10,x4=-2,GO=e=>e==="*";function _4(e,t){let r=e.split("/"),n=r.length;return r.some(GO)&&(n+=x4),t&&(n+=v4),r.filter(i=>!GO(i)).reduce((i,o)=>i+(y4.test(o)?g4:o===""?b4:w4),n)}function S4(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function O4(e,t,r){let{routesMeta:n}=e,i={},o="/",s=[];for(let u=0;u{let{paramName:y,isOptional:b}=p;if(y==="*"){let w=u[h]||"";s=o.slice(0,o.length-w.length).replace(/(.)\/+$/,"$1")}const S=u[h];return b&&!S?d[y]=void 0:d[y]=(S||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:s,pattern:e}}function A4(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),px(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,u,c)=>(n.push({paramName:u,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function P4(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return px(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function mx(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const T4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,C4=e=>T4.test(e);function k4(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?As(e):e,o;if(r)if(C4(r))o=r;else{if(r.includes("//")){let s=r;r=r.replace(/\/\/+/g,"/"),px(!1,"Pathnames cannot have embedded double slashes - normalizing "+(s+" -> "+r))}r.startsWith("/")?o=YO(r.substring(1),"/"):o=YO(r,t)}else o=t;return{pathname:o,search:N4(n),hash:M4(i)}}function YO(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Km(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function j4(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function TR(e,t){let r=j4(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function CR(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=As(e):(i=ru({},e),kt(!i.pathname||!i.pathname.includes("?"),Km("?","pathname","search",i)),kt(!i.pathname||!i.pathname.includes("#"),Km("#","pathname","hash",i)),kt(!i.search||!i.search.includes("#"),Km("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,u;if(s==null)u=r;else{let h=t.length-1;if(!n&&s.startsWith("..")){let y=s.split("/");for(;y[0]==="..";)y.shift(),h-=1;i.pathname=y.join("/")}u=h>=0?t[h]:"/"}let c=k4(i,u),d=s&&s!=="/"&&s.endsWith("/"),p=(o||s===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(d||p)&&(c.pathname+="/"),c}const zi=e=>e.join("/").replace(/\/\/+/g,"/"),R4=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),N4=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,M4=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function I4(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const kR=["post","put","patch","delete"];new Set(kR);const $4=["get",...kR];new Set($4);/** * React Router v6.30.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function nu(){return nu=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u.current=!0}),$.useCallback(function(d,p){if(p===void 0&&(p={}),!u.current)return;if(typeof d=="number"){n.go(d);return}let h=CR(d,JSON.parse(s),o,p.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:zi([t,h.pathname])),(p.replace?n.replace:n.push)(h,p.state,p)},[t,n,s,o,e])}function NR(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=$.useContext(Zo),{matches:i}=$.useContext(ea),{pathname:o}=Ps(),s=JSON.stringify(TR(i,n.v7_relativeSplatPath));return $.useMemo(()=>CR(e,JSON.parse(s),o,r==="path"),[e,s,o,r])}function U4(e,t){return z4(e,t)}function z4(e,t,r,n){Gu()||kt(!1);let{navigator:i}=$.useContext(Zo),{matches:o}=$.useContext(ea),s=o[o.length-1],u=s?s.params:{};s&&s.pathname;let c=s?s.pathnameBase:"/";s&&s.route;let d=Ps(),p;if(t){var h;let v=typeof t=="string"?As(t):t;c==="/"||(h=v.pathname)!=null&&h.startsWith(c)||kt(!1),p=v}else p=d;let y=p.pathname||"/",b=y;if(c!=="/"){let v=c.replace(/^\//,"").split("/");b="/"+y.replace(/^\//,"").split("/").slice(v.length).join("/")}let S=h4(e,{pathname:b}),w=X4(S&&S.map(v=>Object.assign({},v,{params:Object.assign({},u,v.params),pathname:zi([c,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?c:zi([c,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),o,r,n);return t&&w?$.createElement(Xu.Provider,{value:{location:nu({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:Bi.Pop}},w):w}function H4(){let e=J4(),t=I4(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return $.createElement($.Fragment,null,$.createElement("h2",null,"Unexpected Application Error!"),$.createElement("h3",{style:{fontStyle:"italic"}},t),r?$.createElement("pre",{style:i},r):null,null)}const W4=$.createElement(H4,null);class V4 extends $.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?$.createElement(ea.Provider,{value:this.props.routeContext},$.createElement(jR.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function K4(e){let{routeContext:t,match:r,children:n}=e,i=$.useContext(yx);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),$.createElement(ea.Provider,{value:t},n)}function X4(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if(!r)return null;if(r.errors)e=r.matches;else if((o=n)!=null&&o.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let s=e,u=(i=r)==null?void 0:i.errors;if(u!=null){let p=s.findIndex(h=>h.route.id&&(u==null?void 0:u[h.route.id])!==void 0);p>=0||kt(!1),s=s.slice(0,Math.min(s.length,p+1))}let c=!1,d=-1;if(r&&n&&n.v7_partialHydration)for(let p=0;p=0?s=s.slice(0,d+1):s=[s[0]];break}}}return s.reduceRight((p,h,y)=>{let b,S=!1,w=null,v=null;r&&(b=u&&h.route.id?u[h.route.id]:void 0,w=h.route.errorElement||W4,c&&(d<0&&y===0?(e5("route-fallback"),S=!0,v=null):d===y&&(S=!0,v=h.route.hydrateFallbackElement||null)));let x=t.concat(s.slice(0,y+1)),O=()=>{let A;return b?A=w:S?A=v:h.route.Component?A=$.createElement(h.route.Component,null):h.route.element?A=h.route.element:A=p,$.createElement(K4,{match:h,routeContext:{outlet:p,matches:x,isDataRoute:r!=null},children:A})};return r&&(h.route.ErrorBoundary||h.route.errorElement||y===0)?$.createElement(V4,{location:r.location,revalidation:r.revalidation,component:w,error:b,children:O(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):O()},null)}var MR=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(MR||{}),IR=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(IR||{});function G4(e){let t=$.useContext(yx);return t||kt(!1),t}function Y4(e){let t=$.useContext(D4);return t||kt(!1),t}function Q4(e){let t=$.useContext(ea);return t||kt(!1),t}function $R(e){let t=Q4(),r=t.matches[t.matches.length-1];return r.route.id||kt(!1),r.route.id}function J4(){var e;let t=$.useContext(jR),r=Y4(),n=$R();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function Z4(){let{router:e}=G4(MR.UseNavigateStable),t=$R(IR.UseNavigateStable),r=$.useRef(!1);return RR(()=>{r.current=!0}),$.useCallback(function(i,o){o===void 0&&(o={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,nu({fromRouteId:t},o)))},[e,t])}const QO={};function e5(e,t,r){QO[e]||(QO[e]=!0)}function t5(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Vf(e){kt(!1)}function r5(e){let{basename:t="/",children:r=null,location:n,navigationType:i=Bi.Pop,navigator:o,static:s=!1,future:u}=e;Gu()&&kt(!1);let c=t.replace(/^\/*/,"/"),d=$.useMemo(()=>({basename:c,navigator:o,static:s,future:nu({v7_relativeSplatPath:!1},u)}),[c,u,o,s]);typeof n=="string"&&(n=As(n));let{pathname:p="/",search:h="",hash:y="",state:b=null,key:S="default"}=n,w=$.useMemo(()=>{let v=mx(p,c);return v==null?null:{location:{pathname:v,search:h,hash:y,state:b,key:S},navigationType:i}},[c,p,h,y,b,S,i]);return w==null?null:$.createElement(Zo.Provider,{value:d},$.createElement(Xu.Provider,{children:r,value:w}))}function n5(e){let{children:t,location:r}=e;return U4(Ab(t),r)}new Promise(()=>{});function Ab(e,t){t===void 0&&(t=[]);let r=[];return $.Children.forEach(e,(n,i)=>{if(!$.isValidElement(n))return;let o=[...t,i];if(n.type===$.Fragment){r.push.apply(r,Ab(n.props.children,o));return}n.type!==Vf&&kt(!1),!n.props.index||!n.props.children||kt(!1);let s={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=Ab(n.props.children,o)),r.push(s)}),r}/** * React Router DOM v6.30.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Pb(){return Pb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function o5(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function a5(e,t){return e.button===0&&(!t||t==="_self")&&!o5(e)}const s5=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],l5="6";try{window.__reactRouterVersion=l5}catch{}const u5="startTransition",JO=rB[u5];function c5(e){let{basename:t,children:r,future:n,window:i}=e,o=$.useRef();o.current==null&&(o.current=c4({window:i,v5Compat:!0}));let s=o.current,[u,c]=$.useState({action:s.action,location:s.location}),{v7_startTransition:d}=n||{},p=$.useCallback(h=>{d&&JO?JO(()=>c(h)):c(h)},[c,d]);return $.useLayoutEffect(()=>s.listen(p),[s,p]),$.useEffect(()=>t5(n),[n]),$.createElement(r5,{basename:t,children:r,location:u.location,navigationType:u.action,navigator:s,future:n})}const f5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",d5=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Tb=$.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:o,replace:s,state:u,target:c,to:d,preventScrollReset:p,viewTransition:h}=t,y=i5(t,s5),{basename:b}=$.useContext(Zo),S,w=!1;if(typeof d=="string"&&d5.test(d)&&(S=d,f5))try{let A=new URL(window.location.href),P=d.startsWith("//")?new URL(A.protocol+d):new URL(d),E=mx(P.pathname,b);P.origin===A.origin&&E!=null?d=E+P.search+P.hash:w=!0}catch{}let v=L4(d,{relative:i}),x=h5(d,{replace:s,state:u,target:c,preventScrollReset:p,relative:i,viewTransition:h});function O(A){n&&n(A),A.defaultPrevented||x(A)}return $.createElement("a",Pb({},y,{href:S||v,onClick:w||o?n:O,ref:r,target:c}))});var ZO;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ZO||(ZO={}));var eE;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(eE||(eE={}));function h5(e,t){let{target:r,replace:n,state:i,preventScrollReset:o,relative:s,viewTransition:u}=t===void 0?{}:t,c=F4(),d=Ps(),p=NR(e,{relative:s});return $.useCallback(h=>{if(a5(h,r)){h.preventDefault();let y=n!==void 0?n:od(d)===od(p);c(e,{replace:y,state:i,preventScrollReset:o,relative:s,viewTransition:u})}},[d,c,p,n,i,r,e,o,s,u])}function DR(e,t){return function(){return e.apply(t,arguments)}}const{toString:p5}=Object.prototype,{getPrototypeOf:Ki}=Object,{iterator:Yu,toStringTag:LR}=Symbol,iu=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),BR=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),FR=(e,t,r)=>e===Object.prototype||!r&&t===null,m5=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(r=>{if(BR(r))return!1;const n=Object.getOwnPropertyDescriptor(e,r);return!!n&&n.configurable&&n.writable===!0})},ou=(e,t)=>{let r=e;const n=[];for(;r!=null;){if(n.indexOf(r)!==-1)return!1;n.push(r);const i=Ki(r);if(FR(r,i,r===e))return!1;if(iu(r,t))return!0;r=i}return!1},y5=(e,t)=>e!=null&&ou(e,t)?e[t]:void 0,g5=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=Ki(e);if(t===null&&m5(e))return e;const r=Object.create(null),n=Object.create(null),i=[];let o=e;for(;o!=null&&i.indexOf(o)===-1;){i.push(o);const s=o===e?t:Ki(o);if(FR(o,s,o===e))break;const u=Object.getOwnPropertyNames(o);Object.getOwnPropertySymbols&&u.push(...Object.getOwnPropertySymbols(o));for(const c of u)BR(c)||iu(n,c)||(r[c]=e[c],n[c]=!0);o=s}return r},gx=(e=>t=>{const r=p5.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Qr=e=>(e=e.toLowerCase(),t=>gx(t)===e),ah=e=>t=>typeof t===e,{isArray:Ho}=Array,Wo=ah("undefined");function Ts(e){return e!==null&&!Wo(e)&&e.constructor!==null&&!Wo(e.constructor)&&Or(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const qR=Qr("ArrayBuffer");function v5(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&qR(e.buffer),t}const b5=ah("string"),Or=ah("function"),UR=ah("number"),Cs=e=>e!==null&&typeof e=="object",w5=e=>e===!0||e===!1,Kf=e=>{if(!Cs(e))return!1;const t=Ki(e);return(t===null||t===Object.prototype||Ki(t)===null)&&!ou(e,LR)&&!ou(e,Yu)},x5=e=>{if(!Cs(e)||Ts(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},_5=Qr("Date"),S5=Qr("File"),O5=e=>!!(e&&typeof e.uri<"u"),E5=e=>e&&typeof e.getParts<"u",A5=Qr("Blob"),P5=Qr("FileList"),T5=Qr("Set"),C5=e=>Cs(e)&&Or(e.pipe);function k5(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const tE=k5(),rE=typeof tE.FormData<"u"?tE.FormData:void 0,j5=e=>{if(!e)return!1;if(rE&&e instanceof rE)return!0;const t=Ki(e);if(!t||t===Object.prototype||!Or(e.append))return!1;const r=gx(e);return r==="formdata"||r==="object"&&Or(e.toString)&&e.toString()==="[object FormData]"},R5=Qr("URLSearchParams"),[N5,M5,I5,$5]=["ReadableStream","Request","Response","Headers"].map(Qr),D5=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qu(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),Ho(e))for(n=0,i=e.length;n0;)if(i=r[n],t===i.toLowerCase())return i;return null}const Eo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,HR=e=>!Wo(e)&&e!==Eo;function Cb(...e){const{caseless:t,skipUndefined:r}=HR(this)&&this||{},n={},i=(o,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const u=t&&typeof s=="string"&&zR(n,s)||s,c=iu(n,u)?n[u]:void 0;Kf(c)&&Kf(o)?n[u]=Cb(c,o):Kf(o)?n[u]=Cb({},o):Ho(o)?n[u]=o.slice():(!r||!Wo(o))&&(n[u]=o)};for(let o=0,s=e.length;o(Qu(t,(i,o)=>{r&&Or(i)?Object.defineProperty(e,o,{__proto__:null,value:DR(i,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),B5=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),F5=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),r&&Object.assign(e.prototype,r)},q5=(e,t,r,n)=>{let i,o,s;const u={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!n||n(s,e,t))&&!u[s]&&(t[s]=e[s],u[s]=!0);e=r!==!1&&Ki(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},U5=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},z5=e=>{if(!e)return null;if(Ho(e))return e;let t=e.length;if(!UR(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},H5=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ki(Uint8Array)),W5=(e,t)=>{const n=(e&&e[Yu]).call(e);let i;for(;(i=n.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},V5=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},K5=Qr("HTMLFormElement"),X5=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),{propertyIsEnumerable:G5}=Object.prototype,Y5=Qr("RegExp"),WR=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Qu(r,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(n[o]=s||i)}),Object.defineProperties(e,n)},Q5=e=>{WR(e,(t,r)=>{if(Or(e)&&["arguments","caller","callee"].includes(r))return!1;const n=e[r];if(Or(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},J5=(e,t)=>{const r={},n=i=>{i.forEach(o=>{r[o]=!0})};return Ho(e)?n(e):n(String(e).split(t)),r},Z5=()=>{},eF=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function tF(e){return!!(e&&Or(e.append)&&e[LR]==="FormData"&&e[Yu])}const rF=e=>{const t=new WeakSet,r=n=>{if(Cs(n)){if(t.has(n))return;if(Ts(n))return n;if(!("toJSON"in n)){t.add(n);let i;if(T5(n)){i=[];for(const o of n){const s=r(o);!Wo(s)&&i.push(s)}}else i=Ho(n)?[]:{},Qu(n,(o,s)=>{const u=r(o);!Wo(u)&&(i[s]=u)});return t.delete(n),i}}return n};return r(e)},nF=Qr("AsyncFunction"),iF=e=>e&&(Cs(e)||Or(e))&&Or(e.then)&&Or(e.catch),VR=((e,t)=>e?setImmediate:t?((r,n)=>(Eo.addEventListener("message",({source:i,data:o})=>{i===Eo&&o===r&&n.length&&n.shift()()},!1),i=>{n.push(i),Eo.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Or(Eo.postMessage)),oF=typeof queueMicrotask<"u"?queueMicrotask.bind(Eo):typeof process<"u"&&process.nextTick||VR,KR=e=>e!=null&&Or(e[Yu]),aF=e=>e!=null&&ou(e,Yu)&&KR(e),B={isArray:Ho,isArrayBuffer:qR,isBuffer:Ts,isFormData:j5,isArrayBufferView:v5,isString:b5,isNumber:UR,isBoolean:w5,isObject:Cs,isPlainObject:Kf,isEmptyObject:x5,isReadableStream:N5,isRequest:M5,isResponse:I5,isHeaders:$5,isUndefined:Wo,isDate:_5,isFile:S5,isReactNativeBlob:O5,isReactNative:E5,isBlob:A5,isRegExp:Y5,isFunction:Or,isStream:C5,isURLSearchParams:R5,isTypedArray:H5,isFileList:P5,forEach:Qu,merge:Cb,extend:L5,trim:D5,stripBOM:B5,inherits:F5,toFlatObject:q5,kindOf:gx,kindOfTest:Qr,endsWith:U5,toArray:z5,forEachEntry:W5,matchAll:V5,isHTMLForm:K5,hasOwnProperty:iu,hasOwnProp:iu,hasOwnInPrototypeChain:ou,getSafeProp:y5,toSafeFlatObject:g5,reduceDescriptors:WR,freezeMethods:Q5,toObjectSet:J5,toCamelCase:X5,noop:Z5,toFiniteNumber:eF,findKey:zR,global:Eo,isContextDefined:HR,isSpecCompliantForm:tF,toJSONObject:rF,isAsyncFn:nF,isThenable:iF,setImmediate:VR,asap:oF,isIterable:KR,isSafeIterable:aF},sF=B.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),lF=e=>{const t={};let r,n,i;return e&&e.split(` `).forEach(function(s){i=s.indexOf(":"),r=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim();const u=B.hasOwnProp(t,r);!r||u&&B.hasOwnProp(sF,r)||(r==="set-cookie"?u?t[r].push(n):t[r]=[n]:t[r]=u?t[r]+", "+n:n)}),t};function uF(e){let t=0,r=e.length;for(;tt;){const n=e.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}const cF=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),fF=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function vx(e,t){return B.isArray(e)?e.map(r=>vx(r,t)):uF(String(e).replace(t,""))}const dF=e=>vx(e,cF),hF=e=>vx(e,fF);function XR(e){const t=Object.create(null);return B.forEach(e.toJSON(),(r,n)=>{t[n]=hF(r)}),t}const nE=Symbol("internals");function El(e){return e&&String(e).trim().toLowerCase()}function Xf(e){return e===!1||e==null?e:B.isArray(e)?e.map(Xf):dF(String(e))}function pF(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const mF=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Xm(e){let t=0,r=e.length;for(;tt;){const n=e.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}function yF(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let r="";for(let n=1;n=t))return e;r+=e[n]}return r}function gF(e){const t=Object.create(null),r=String(e);let n=0,i=!1,o=!1;function s(u){const c=Xm(r.slice(n,u)),d=c.indexOf("=");if(d<1)return;const p=Xm(c.slice(0,d));if(!mF.test(p))return;const h=p.toLowerCase();if(h==="__proto__"||h==="constructor"||h==="prototype")return;const y=Xm(c.slice(d+1));t[h]=yF(y)}for(let u=0;u/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Gm(e,t,r,n,i){if(B.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!B.isString(t)){if(B.isString(n))return t.indexOf(n)!==-1;if(B.isRegExp(n))return n.test(t)}}function bF(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function wF(e,t){const r=B.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{__proto__:null,value:function(i,o,s){return this[n].call(this,t,i,o,s)},configurable:!0})})}let sr=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function o(u,c,d){const p=El(c);if(!p)return;const h=B.findKey(i,p);(!h||i[h]===void 0||d===!0||d===void 0&&i[h]!==!1)&&(i[h||c]=Xf(u))}const s=(u,c)=>B.forEach(u,(d,p)=>o(d,p,c));if(B.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(B.isString(t)&&(t=t.trim())&&!vF(t))s(lF(t),r);else if(B.isObject(t)&&B.isSafeIterable(t)){let u=Object.create(null),c,d;for(const p of t){if(!B.isArray(p))throw new TypeError("Object iterator must return a key-value pair");d=p[0],B.hasOwnProp(u,d)?(c=u[d],u[d]=B.isArray(c)?[...c,p[1]]:[c,p[1]]):u[d]=p[1]}s(u,r)}else t!=null&&o(r,t,n);return this}get(t,r){if(t=El(t),t){const n=B.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return pF(i);if(B.isFunction(r))return r.call(this,i,n);if(B.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=El(t),t){const n=B.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Gm(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function o(s){if(s=El(s),s){const u=B.findKey(n,s);u&&(!r||Gm(n,n[u],u,r))&&(delete n[u],i=!0)}}return B.isArray(t)?t.forEach(o):o(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const o=r[n];(!t||Gm(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const r=this,n={};return B.forEach(this,(i,o)=>{const s=B.findKey(n,o);if(s){r[s]=Xf(i),delete r[o];return}const u=t?bF(o):String(o).trim();u!==o&&delete r[o],r[u]=Xf(i),n[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return B.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&B.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` `)}getSetCookie(){const t=this.get("set-cookie");return B.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return gF(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[nE]=this[nE]={accessors:{}}).accessors,i=this.prototype;function o(s){const u=El(s);n[u]||(wF(i,s),n[u]=!0)}return B.isArray(t)?t.forEach(o):o(t),this}};sr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);B.reduceDescriptors(sr.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});B.freezeMethods(sr);const ad="[REDACTED ****]";function xF(e){if(B.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(B.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function _F(e,t){const r=new Set(t.map(o=>String(o).toLowerCase())),n=[],i=o=>{if(o===null||typeof o!="object"||B.isBuffer(o))return o;if(n.indexOf(o)!==-1)return;o instanceof sr&&(o=o.toJSON()),n.push(o);let s;if(B.isArray(o))s=[],o.forEach((u,c)=>{const d=i(u);B.isUndefined(d)||(s[c]=d)});else{if(!B.isPlainObject(o)&&xF(o))return n.pop(),o;s=Object.create(null);for(const[u,c]of Object.entries(o)){const d=r.has(u.toLowerCase())?ad:i(c);B.isUndefined(d)||(s[u]=d)}}return n.pop(),s};return i(e)}function iE(e){try{return String(e)}catch{return""}}function SF(e){return e.errors.map(r=>{try{return r&&r.message?iE(r.message):iE(r)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let de=class GR extends Error{static from(t,r,n,i,o,s){let u=t.message;!u&&B.isArray(t.errors)&&t.errors.length&&(u=SF(t));const c=new GR(u,r||t.code,n,i,o);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),s&&Object.assign(c,s),c}constructor(t,r,n,i,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),i&&(this.request=i),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,r=t&&B.hasOwnProp(t,"redact")?t.redact:void 0,n=B.isArray(r)&&r.length>0?_F(t,r):B.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};de.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";de.ERR_BAD_OPTION="ERR_BAD_OPTION";de.ECONNABORTED="ECONNABORTED";de.ETIMEDOUT="ETIMEDOUT";de.ECONNREFUSED="ECONNREFUSED";de.ERR_NETWORK="ERR_NETWORK";de.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";de.ERR_DEPRECATED="ERR_DEPRECATED";de.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";de.ERR_BAD_REQUEST="ERR_BAD_REQUEST";de.ERR_CANCELED="ERR_CANCELED";de.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";de.ERR_INVALID_URL="ERR_INVALID_URL";de.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const OF=null,YR=100;function kb(e){return B.isPlainObject(e)||B.isArray(e)}function QR(e){return B.endsWith(e,"[]")?e.slice(0,-2):e}function Ym(e,t,r){return e?e.concat(t).map(function(i,o){return i=QR(i),!r&&o?"["+i+"]":i}).join(r?".":""):t}function EF(e){return B.isArray(e)&&!e.some(kb)}const AF=B.toFlatObject(B,{},null,function(t){return/^is[A-Z]/.test(t)});function sh(e,t,r){if(!B.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(O,A)=>{const P=B.getSafeProp(r,O);return B.isUndefined(P)?A:P},i=n("metaTokens",!0),o=n("visitor")||w,s=n("dots",!1),u=n("indexes",!1),c=n("Blob")||typeof Blob<"u"&&Blob,d=n("maxDepth",YR),p=c&&B.isSpecCompliantForm(t),h=[];if(!B.isFunction(o))throw new TypeError("visitor must be a function");function y(O){if(O===null)return"";if(B.isDate(O))return O.toISOString();if(B.isBoolean(O))return O.toString();if(!p&&B.isBlob(O))throw new de("Blob is not supported. Use a Buffer instead.");if(B.isArrayBuffer(O)||B.isTypedArray(O)){if(p&&typeof c=="function")return new c([O]);throw new de("Blob is not supported. Use a Buffer instead.",de.ERR_NOT_SUPPORT)}return O}function b(O){if(O>d)throw new de("Object is too deeply nested ("+O+" levels). Max depth: "+d,de.ERR_FORM_DATA_DEPTH_EXCEEDED)}function S(O,A){if(d===1/0)return JSON.stringify(O);const P=[];return JSON.stringify(O,function(T,j){if(!B.isObject(j))return j;for(;P.length&&P[P.length-1]!==this;)P.pop();return P.push(j),b(A+P.length-1),j})}function w(O,A,P){let E=O;if(B.isReactNative(t)&&B.isReactNativeBlob(O))return t.append(Ym(P,A,s),y(O)),!1;if(O&&!P&&typeof O=="object"){if(B.endsWith(A,"{}"))A=i?A:A.slice(0,-2),O=S(O,1);else if(B.isArray(O)&&EF(O)||(B.isFileList(O)||B.endsWith(A,"[]"))&&(E=B.toArray(O)))return A=QR(A),E.forEach(function(j,R){!(B.isUndefined(j)||j===null)&&t.append(u===!0?Ym([A],R,s):u===null?A:A+"[]",y(j))}),!1}return kb(O)?!0:(t.append(Ym(P,A,s),y(O)),!1)}const v=Object.assign(AF,{defaultVisitor:w,convertValue:y,isVisitable:kb});function x(O,A,P=0){if(!B.isUndefined(O)){if(b(P),h.indexOf(O)!==-1)throw new Error("Circular reference detected in "+A.join("."));h.push(O),B.forEach(O,function(T,j){(!(B.isUndefined(T)||T===null)&&o.call(t,T,B.isString(j)?j.trim():j,A,v))===!0&&x(T,A?A.concat(j):[j],P+1)}),h.pop()}}if(!B.isObject(e))throw new TypeError("data must be an object");return x(e),t}function oE(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(n){return t[n]})}function bx(e,t){this._pairs=[],e&&sh(e,this,t)}const JR=bx.prototype;JR.append=function(t,r){this._pairs.push([t,r])};JR.toString=function(t){const r=t?n=>t.call(this,n,oE):oE;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function PF(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ZR(e,t,r){if(!t)return e;e=e||"";const n=B.isFunction(r)?{serialize:r}:r,i=B.getSafeProp(n,"encode")||PF,o=B.getSafeProp(n,"serialize");let s;if(o?s=o(t,n):s=B.isURLSearchParams(t)?t.toString():new bx(t,n).toString(i),s){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}const Al=Symbol("internals");function eN(e){return e?e.length:0}function aE(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function Pl(e,t){const r=e.handlers,n=eN(r);r!==t.handlersRef?(t.handlersRef=r,t.handlerEntries.clear()):n!==t.handlersLength&&(n?t.handlerEntries.forEach(function(o,s){r[o.index]!==o.handler&&t.handlerEntries.delete(s)}):t.handlerEntries.clear()),t.handlersLength=n}class sE{constructor(){this.handlers=[],this[Al]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(t,r,n){const i={fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null},o=this[Al];this.handlers==null&&(this.handlers=[]),Pl(this,o);const s=o.nextId++;return this.handlers.push(i),o.handlerEntries.set(s,{handler:i,index:this.handlers.length-1}),o.handlersLength=this.handlers.length,s}eject(t){const r=this[Al];Pl(this,r);const n=r.handlerEntries.get(t);if(n){if(r.handlerEntries.delete(t),this.handlers[n.index]!==n.handler)return;this.handlers[n.index]=null,r.iterationDepth||(aE(this.handlers),r.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],Pl(this,this[Al]))}forEach(t){const r=this[Al];Pl(this,r),r.iterationDepth++;try{B.forEach(this.handlers,function(i){i!==null&&t(i)})}finally{--r.iterationDepth||(Pl(this,r),aE(this.handlers),r.handlersLength=eN(this.handlers))}}}const wx={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},TF=typeof URLSearchParams<"u"?URLSearchParams:bx,CF=typeof FormData<"u"?FormData:null,kF=typeof Blob<"u"?Blob:null,jF={isBrowser:!0,classes:{URLSearchParams:TF,FormData:CF,Blob:kF},protocols:["http","https","file","blob","url","data"]},xx=typeof window<"u"&&typeof document<"u",jb=typeof navigator=="object"&&navigator||void 0,RF=xx&&(!jb||["ReactNative","NativeScript","NS"].indexOf(jb.product)<0),NF=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",MF=xx&&window.location.href||"http://localhost",IF=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:xx,hasStandardBrowserEnv:RF,hasStandardBrowserWebWorkerEnv:NF,navigator:jb,origin:MF},Symbol.toStringTag,{value:"Module"})),Vt={...IF,...jF};function $F(e,t){return sh(e,new Vt.classes.URLSearchParams,{visitor:function(r,n,i,o){return Vt.isNode&&B.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const lE=YR;function tN(e){if(e>lE)throw new de("FormData field is too deeply nested ("+e+" levels). Max depth: "+lE,de.ERR_FORM_DATA_DEPTH_EXCEEDED)}function DF(e){const t=[],r=/[^.[\]]+|\[([^.[\]]*)]/g;let n;for(;(n=r.exec(e))!==null;)tN(t.length),t.push(n[0]==="[]"?"":n[1]||n[0]);return t}function LF(e){const t={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n=r.length;return s=!s&&B.isArray(i)?i.length:s,c?(B.hasOwnProp(i,s)?i[s]=B.isArray(i[s])?i[s].concat(n):[i[s],n]:i[s]=n,!u):((!B.hasOwnProp(i,s)||!B.isObject(i[s]))&&(i[s]=[]),t(r,n,i[s],o)&&B.isArray(i[s])&&(i[s]=LF(i[s])),!u)}if(B.isFormData(e)&&B.isFunction(e.entries)){const r={};return B.forEachEntry(e,(n,i)=>{t(DF(n),i,r,0)}),r}return null}const nN=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),Ca=(e,t)=>e!=null&&B.hasOwnProp(e,t)?e[t]:void 0;function BF(e,t,r){if(B.isString(e))try{return(t||JSON.parse)(e),B.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Ju={transitional:wx,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,o=B.isObject(t);if(o&&B.isHTMLForm(t)&&(t=new FormData(t)),B.isFormData(t))return i?JSON.stringify(rN(t)):t;if(B.isArrayBuffer(t)||B.isBuffer(t)||B.isStream(t)||B.isFile(t)||B.isBlob(t)||B.isReadableStream(t))return t;if(B.isArrayBufferView(t))return t.buffer;if(B.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(o){const c=Ca(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return $F(t,c).toString();if((u=B.isFileList(t))||n.indexOf("multipart/form-data")>-1){const d=Ca(this,"env"),p=d&&d.FormData;return sh(u?{"files[]":t}:t,p&&new p,c)}}return o||i?(r.setContentType("application/json",!1),BF(t)):t}],transformResponse:[function(t){const r=Ca(this,"transitional")||Ju.transitional,n=r&&r.forcedJSONParsing,i=Ca(this,"responseType"),o=i==="json";if(B.isResponse(t)||B.isReadableStream(t))return t;if(t&&B.isString(t)&&(n&&!i||o)){const u=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t,Ca(this,"parseReviver"))}catch(c){if(u)throw c.name==="SyntaxError"?de.from(c,de.ERR_BAD_RESPONSE,this,null,Ca(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Vt.classes.FormData,Blob:Vt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};B.forEach(nN,e=>{Ju.headers[e]={}});function Qm(e,t){const r=this||Ju,n=t||r,i=sr.from(n.headers);let o=n.data;return B.forEach(e,function(u){o=u.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function iN(e){return!!(e&&e.__CANCEL__)}let Zu=class extends de{constructor(t,r,n){super(t??"canceled",de.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}};function oN(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new de("Request failed with status code "+r.status,r.status>=400&&r.status<500?de.ERR_BAD_REQUEST:de.ERR_BAD_RESPONSE,r.config,r.request,r))}const FF=/[\t\n\r]/g;function aN(e){if(typeof e!="string")return e;let t=0;for(;t{r=h,i=null,o&&(clearTimeout(o),o=null),e(...p)};return[(...p)=>{const h=Date.now(),y=h-r;y>=n?s(p,h):(i=p,o||(o=setTimeout(()=>{o=null,s(i)},n-y)))},()=>i&&s(i),(...p)=>s(p)]}const sd=(e,t,r=3)=>{let n=0;const i=qF(50,250);return UF(o=>{if(!o||!B.isNumber(o.loaded))return;const s=o.loaded,u=o.lengthComputable?o.total:void 0,c=Math.max(0,u!=null?Math.min(s,u):s),d=Math.max(0,c-n),p=i(d);n=Math.max(n,c);const h={loaded:c,total:u,progress:u?c/u:void 0,bytes:d,rate:p||void 0,estimated:p&&u?(u-c)/p:void 0,event:o,lengthComputable:u!=null,[t?"download":"upload"]:!0};e(h)},r)},uE=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},cE=(e,t=B.asap)=>(...r)=>t(()=>e(...r)),zF=Vt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Vt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Vt.origin),Vt.navigator&&/(msie|trident)/i.test(Vt.navigator.userAgent)):()=>!0,HF=Vt.hasStandardBrowserEnv?{write(e,t,r,n,i,o,s){if(typeof document>"u")return;const u=[`${e}=${encodeURIComponent(t)}`];B.isNumber(r)&&u.push(`expires=${new Date(r).toUTCString()}`),B.isString(n)&&u.push(`path=${n}`),B.isString(i)&&u.push(`domain=${i}`),o===!0&&u.push("secure"),B.isString(s)&&u.push(`SameSite=${s}`),document.cookie=u.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let r=0;r0&&e.charCodeAt(r-1)===47;)r--;return e.slice(0,r)+"/"+t.replace(/^\/+/,"")}const KF=/^https?:(?!\/\/)/i;function XF(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,r,n="")=>`${r}${n}${ad}`)}function GF(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${ad}@`),r=t.indexOf("#"),i=(r===-1?t:t.slice(0,r)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${ad}`);return r===-1?i:`${i}#${XF(t.slice(r+1))}`}function fE(e,t){if(typeof e=="string"){const r=aN(e);if(KF.test(r))throw new de(`Invalid URL ${JSON.stringify(GF(r))}: missing "//" after protocol`,de.ERR_INVALID_URL,t)}}function sN(e,t,r,n){fE(t,n);let i=!WF(t);return e&&(i||r===!1)?(fE(e,n),VF(e,t)):t}const dE=e=>e instanceof sr?{...e}:e,YF=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function Vo(e,t){e=e||{},t=t||{};const r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(p,h,y,b){return B.isPlainObject(p)&&B.isPlainObject(h)?B.merge.call({caseless:b},p,h):B.isPlainObject(h)?B.merge({},h):B.isArray(h)?h.slice():h}function i(p,h,y,b){if(B.isUndefined(h)){if(!B.isUndefined(p))return n(void 0,p,y,b)}else return n(p,h,y,b)}function o(p,h){if(!B.isUndefined(h))return n(void 0,h)}function s(p,h){if(B.isUndefined(h)){if(!B.isUndefined(p))return n(void 0,p)}else return n(void 0,h)}function u(p){const h=B.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!B.isUndefined(h))if(B.isPlainObject(h)){if(B.hasOwnProp(h,p))return h[p]}else return;const y=B.hasOwnProp(e,"transitional")?e.transitional:void 0;if(B.isPlainObject(y)&&B.hasOwnProp(y,p))return y[p]}function c(p,h,y){if(B.hasOwnProp(t,y))return n(p,h);if(B.hasOwnProp(e,y))return n(void 0,p)}const d={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutErrorMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,allowedSocketPaths:s,responseEncoding:s,validateStatus:c,headers:(p,h,y)=>i(dE(p),dE(h),y,!0)};return B.forEach(YF({...e,...t}),function(h){if(h==="__proto__"||h==="constructor"||h==="prototype")return;const y=B.hasOwnProp(d,h)?d[h]:i,b=B.hasOwnProp(e,h)?e[h]:void 0,S=B.hasOwnProp(t,h)?t[h]:void 0,w=y(b,S,h);B.isUndefined(w)&&y!==c||(r[h]=w)}),B.hasOwnProp(t,"validateStatus")&&B.isUndefined(t.validateStatus)&&u("validateStatusUndefinedResolves")===!1&&(B.hasOwnProp(e,"validateStatus")?r.validateStatus=n(void 0,e.validateStatus):delete r.validateStatus),r}const QF=["content-type","content-length"];function JF(e,t,r){if(r!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([n,i])=>{QF.includes(n.toLowerCase())&&e.set(n,i)})}const ZF=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16)));function lN(e){const t=Vo({},e),r=y=>B.hasOwnProp(t,y)?t[y]:void 0,n=r("data");let i=r("withXSRFToken");const o=r("xsrfHeaderName"),s=r("xsrfCookieName");let u=r("headers");const c=r("auth"),d=r("baseURL"),p=r("allowAbsoluteUrls"),h=r("url");if(t.headers=u=sr.from(u),t.url=ZR(sN(d,h,p,t),r("params"),r("paramsSerializer")),c){const y=B.getSafeProp(c,"username")||"",b=B.getSafeProp(c,"password")||"";try{u.set("Authorization","Basic "+btoa(y+":"+(b?ZF(b):"")))}catch(S){throw de.from(S,de.ERR_BAD_OPTION_VALUE,e)}}if(B.isFormData(n)){const y=B.getSafeProp(n,"getHeaders");Vt.hasStandardBrowserEnv||Vt.hasStandardBrowserWebWorkerEnv||B.isReactNative(n)?u.setContentType(void 0):B.isFunction(y)&&JF(u,y.call(n),r("formDataHeaderPolicy"))}if(Vt.hasStandardBrowserEnv&&(B.isFunction(i)&&(i=i(t)),i===!0||i==null&&zF(t.url))){const b=o&&s&&HF.read(s);b&&u.set(o,b)}return t}const eq=typeof XMLHttpRequest<"u",tq=eq&&function(e){return new Promise(function(r,n){const i=lN(e);let o=i.data;const s=sr.from(i.headers).normalize();let{responseType:u,onUploadProgress:c,onDownloadProgress:d}=i,p,h,y,b,S,w;function v(){b&&b(),S&&S(),i.cancelToken&&i.cancelToken.unsubscribe(p),i.signal&&i.signal.removeEventListener("abort",p)}let x=new XMLHttpRequest;x.open(i.method.toUpperCase(),i.url,!0),x.timeout=i.timeout;function O(P){if(!x)return;if(x.status===0&&(Jm(aN(i.url))||Jm(Vt.origin))!=="file"&&!(x.responseURL&&x.responseURL.startsWith("file:"))){n(new de("Request aborted",de.ECONNABORTED,e,x)),v(),x=null;return}try{P?w&&w(P):S&&S()}catch(R){setTimeout(()=>{throw R})}if(!x)return;const E=sr.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),j={data:!u||u==="text"||u==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:E,config:e,request:x};oN(function(N){r(N),v()},function(N){n(N),v()},j),x=null}"onloadend"in x?x.onloadend=O:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(O)},x.onabort=function(){x&&(n(new de("Request aborted",de.ECONNABORTED,e,x)),v(),x=null)},x.onerror=function(E){const T=E&&E.message?E.message:"Network Error",j=new de(T,de.ERR_NETWORK,e,x);j.event=E||null,n(j),v(),x=null},x.ontimeout=function(){let E=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const T=i.transitional||wx;i.timeoutErrorMessage&&(E=i.timeoutErrorMessage),n(new de(E,T.clarifyTimeoutError?de.ETIMEDOUT:de.ECONNABORTED,e,x)),v(),x=null},o===void 0&&s.setContentType(null),"setRequestHeader"in x&&B.forEach(XR(s),function(E,T){x.setRequestHeader(T,E)}),B.isUndefined(i.withCredentials)||(x.withCredentials=!!i.withCredentials),u&&u!=="json"&&(x.responseType=i.responseType),d&&([y,S,w]=sd(d,!0),x.addEventListener("progress",y)),c&&x.upload&&([h,b]=sd(c),x.upload.addEventListener("progress",h),x.upload.addEventListener("loadend",b)),(i.cancelToken||i.signal)&&(p=P=>{x&&(n(!P||P.type?new Zu(null,e,x):P),x.abort(),v(),x=null)},i.cancelToken&&i.cancelToken.subscribe(p),i.signal&&(i.signal.aborted?p():i.signal.addEventListener("abort",p)));const A=Jm(i.url);if(A&&!Vt.protocols.includes(A)){n(new de("Unsupported protocol "+A+":",de.ERR_BAD_REQUEST,e)),v();return}x.send(o||null)})},rq=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const r=new AbortController;let n=!1;const i=function(c){if(!n){n=!0,s();const d=c instanceof Error?c:this.reason;r.abort(d instanceof de?d:new Zu(d instanceof Error?d.message:d))}};let o=t&&setTimeout(()=>{o=null,i(new de(`timeout of ${t}ms exceeded`,de.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>{if(!n){if(c.aborted){i.call(c);return}c.addEventListener("abort",i,{once:!0})}});const{signal:u}=r;return u.unsubscribe=()=>B.asap(s),u},nq=function*(e,t){let r=e.byteLength;if(r{const i=iq(e,t);let o=0,s,u=c=>{s||(s=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:d,value:p}=await i.next();if(d){u(),c.close();return}let h=p.byteLength;if(r){let y=o+=h;r(y)}c.enqueue(new Uint8Array(p))}catch(d){throw u(d),d}},cancel(c){return u(c),i.return()}},{highWaterMark:2})},pE=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,uN=(e,t,r)=>t+2e<=57?e-48:(e&223)-55,aq=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,sq=e=>e===9||e===10||e===12||e===13||e===32,lq=e=>{const t=Math.floor(e/4),r=e%4;return t*3+(r===2?1:r===3?2:0)},uq=e=>{const t=e.length;let r=0;return t>0&&e.charCodeAt(t-1)===61&&(r++,t>1&&e.charCodeAt(t-2)===61&&r++),Math.floor((t-r)*3/4)},cq=e=>{const t=e.length;let r=0,n=0,i=!1;for(let o=0;o0){i=!0;continue}r++}}return i||n>2||n>0&&(r+n)%4!==0||r%4===1?uq(e):lq(r)},fq=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const r=e.indexOf(",");if(r<0)return 0;const n=e.slice(5,r),i=e.slice(r+1);if(/;base64/i.test(n))return t(i);let s=0;for(let u=0,c=i.length;u=55296&&d<=56319&&u+1=56320&&p<=57343?(s+=4,u++):s+=3}else s+=3}return s};function dq(e){const t=typeof e=="string"?e.indexOf("#"):-1;return fq(t===-1?e:e.slice(0,t),cq)}const _x="1.20.0",yE=64*1024,hq={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:Af}=B,pq=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16))),gE=e=>{if(!B.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},vE=(e,...t)=>{try{return!!e(...t)}catch{return!1}},mq=e=>{const t=e.indexOf("://");let r=e;return t!==-1&&(r=r.slice(t+3)),r.includes("@")||r.includes(":")},yq=e=>{const t=B.global!==void 0&&B.global!==null?B.global:globalThis,{ReadableStream:r,TextEncoder:n}=t;e=B.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:i,Request:o,Response:s}=e,u=i?Af(i):typeof fetch=="function",c=Af(o),d=Af(s);if(!u)return!1;const p=u&&Af(r),h=u&&(typeof n=="function"?(x=>O=>x.encode(O))(new n):async x=>new Uint8Array(await new o(x).arrayBuffer())),y=c&&p&&vE(()=>{let x=!1;const O=new o(Vt.origin,{body:new r,method:"POST",get duplex(){return x=!0,"half"}}),A=O.headers.has("Content-Type");return O.body!=null&&O.body.cancel(),x&&!A}),b=d&&p&&vE(()=>B.isReadableStream(new s("").body)),S={stream:b&&(x=>x.body)};u&&["text","arrayBuffer","blob","formData","stream"].forEach(x=>{!S[x]&&(S[x]=(O,A)=>{let P=O&&O[x];if(P)return P.call(O);throw new de(`Response type '${x}' is not supported`,de.ERR_NOT_SUPPORT,A)})});const w=async x=>{if(x==null)return 0;if(B.isBlob(x))return x.size;if(B.isSpecCompliantForm(x))return(await new o(Vt.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if(B.isArrayBufferView(x)||B.isArrayBuffer(x))return x.byteLength;if(B.isURLSearchParams(x)&&(x=x+""),B.isString(x))return(await h(x)).byteLength},v=async(x,O)=>{const A=B.toFiniteNumber(x.getContentLength());return A??w(O)};return async x=>{let{url:O,method:A,data:P,signal:E,cancelToken:T,timeout:j,onDownloadProgress:R,onUploadProgress:N,responseType:V,headers:q,withCredentials:L="same-origin",fetchOptions:K,maxContentLength:Y,maxBodyLength:Q,maxRedirects:Z}=lN(x);const te=B.isNumber(Y)&&Y>-1,G=B.isNumber(Q)&&Q>-1,re=ye=>B.hasOwnProp(x,ye)?x[ye]:void 0;let W=i||fetch;V=V?(V+"").toLowerCase():"text";let I=rq([E,T&&T.toAbortSignal()],j),z=null;const le=I&&I.unsubscribe&&(()=>{I.unsubscribe()});let pe,he=null;const we=()=>new de("Request body larger than maxBodyLength limit",de.ERR_BAD_REQUEST,x,z);try{let ye;const Ae=re("auth");if(Ae){const Te=B.getSafeProp(Ae,"username")||"",it=B.getSafeProp(Ae,"password")||"";ye={username:Te,password:it}}if(mq(O)){const Te=new URL(O,Vt.origin);if(!ye&&(Te.username||Te.password)){const it=gE(Te.username),Rt=gE(Te.password);ye={username:it,password:Rt}}(Te.username||Te.password)&&(Te.username="",Te.password="",O=Te.href)}if(ye&&(q.delete("authorization"),q.set("Authorization","Basic "+btoa(pq((ye.username||"")+":"+(ye.password||""))))),te&&typeof O=="string"&&O.startsWith("data:")&&dq(O)>Y)throw new de("maxContentLength size of "+Y+" exceeded",de.ERR_BAD_RESPONSE,x,z);if(G&&A!=="get"&&A!=="head"){const Te=await w(P);if(typeof Te=="number"&&isFinite(Te)&&(pe=Te,Te>Q))throw we()}const ie=G&&(B.isReadableStream(P)||B.isStream(P)),Ee=(Te,it,Rt)=>hE(Te,yE,wt=>{if(G&&wt>Q)throw he=we();it&&it(wt)},Rt);if(y&&A!=="get"&&A!=="head"&&(N||ie)){if(pe=pe??await v(q,P),pe!==0||ie){let Te=new o(O,{method:"POST",body:P,duplex:"half"}),it;if(B.isFormData(P)&&(it=Te.headers.get("content-type"))&&q.setContentType(it),Te.body){const[Rt,wt]=N&&uE(pe,sd(cE(N)))||[];P=Ee(Te.body,Rt,wt)}}}else if(ie&&!c&&p&&A!=="get"&&A!=="head")P=Ee(P);else if(ie&&c&&!y&&A!=="get"&&A!=="head")throw new de("Stream request bodies are not supported by the current fetch implementation",de.ERR_NOT_SUPPORT,x,z);B.isString(L)||(L=L?"include":"omit");const Re=c&&"credentials"in o.prototype;if(B.isFormData(P)){const Te=q.getContentType();Te&&/^multipart\/form-data/i.test(Te)&&!/boundary=/i.test(Te)&&q.delete("content-type")}q.set("User-Agent","axios/"+_x,!1);const oe=K==null?K:Object.assign(Object.create(null),K);oe&&(delete oe.body,delete oe.headers,delete oe.method,delete oe.signal,delete oe.duplex,delete oe.credentials);const Le=Object.assign(Object.create(null),oe,{signal:I,method:A.toUpperCase(),headers:XR(q.normalize()),body:P,duplex:"half",credentials:Re?L:void 0});c&&(B.forEach(hq,(Te,it)=>{Le[it]===void 0&&(Le[it]=Te)}),Le.signal===void 0&&(Le.signal=null),Le.body===void 0&&(Le.body=null)),Z===0&&(Le.redirect="manual",oe&&(oe.redirect="manual")),z=c&&new o(O,Le);let Ce=await(c?W(z,oe):W(O,Le));const dt=sr.from(Ce.headers);if(te){const Te=B.toFiniteNumber(dt.getContentLength());if(Te!=null&&Te>Y)throw new de("maxContentLength size of "+Y+" exceeded",de.ERR_BAD_RESPONSE,x,z)}const at=b&&(V==="stream"||V==="response");if(b&&Ce.body&&(R||te||at&&le)){const Te={};["status","statusText","headers"].forEach(Zr=>{Te[Zr]=Ce[Zr]});const it=B.toFiniteNumber(dt.getContentLength()),[Rt,wt]=R&&uE(it,sd(cE(R),!0))||[];let pr=0;const ai=Zr=>{if(te&&(pr=Zr,pr>Y))throw new de("maxContentLength size of "+Y+" exceeded",de.ERR_BAD_RESPONSE,x,z);Rt&&Rt(Zr)};Ce=new s(hE(Ce.body,yE,ai,()=>{wt&&wt(),le&&le()}),Te)}V=V||"text";let rt=await S[B.findKey(S,V)||"text"](Ce,x);if(te&&!b&&!at){let Te;if(rt!=null&&(typeof rt.byteLength=="number"?Te=rt.byteLength:typeof rt.size=="number"?Te=rt.size:typeof rt=="string"&&(Te=typeof n=="function"?new n().encode(rt).byteLength:rt.length)),typeof Te=="number"&&Te>Y)throw new de("maxContentLength size of "+Y+" exceeded",de.ERR_BAD_RESPONSE,x,z)}return!at&&le&&le(),await new Promise((Te,it)=>{oN(Te,it,{data:rt,headers:sr.from(Ce.headers),status:Ce.status,statusText:Ce.statusText,config:x,request:z})})}catch(ye){if(le&&le(),I&&I.aborted&&I.reason instanceof de){const Ae=I.reason;throw Ae.config=x,z&&(Ae.request=z),ye!==Ae&&Object.defineProperty(Ae,"cause",{__proto__:null,value:ye,writable:!0,enumerable:!1,configurable:!0}),Ae}if(he)throw z&&!he.request&&(he.request=z),he;if(ye instanceof de)throw z&&!ye.request&&(ye.request=z),ye;if(ye&&ye.name==="TypeError"&&/Load failed|fetch/i.test(ye.message)){const Ae=new de("Network Error",de.ERR_NETWORK,x,z,ye&&ye.response);throw Object.defineProperty(Ae,"cause",{__proto__:null,value:ye.cause||ye,writable:!0,enumerable:!1,configurable:!0}),Ae}throw de.from(ye,ye&&ye.code,x,z,ye&&ye.response)}}},gq=new Map,cN=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:i}=t,o=[n,i,r];let s=o.length,u=s,c,d,p=gq;for(;u--;)c=o[u],d=p.get(c),d===void 0&&p.set(c,d=u?new Map:yq(t)),p=d;return d};cN();const Sx={http:OF,xhr:tq,fetch:{get:cN}};B.forEach(Sx,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const bE=e=>`- ${e}`,vq=e=>B.isFunction(e)||e===null||e===!1;function bq(e,t){e=B.isArray(e)?e:[e];const{length:r}=e;let n,i;const o={};for(let s=0;s`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let u=r?s.length>1?`since : `+s.map(bE).join(` `):" "+bE(s[0]):"as no adapter specified";throw new de("There is no suitable adapter to dispatch the request "+u,de.ERR_NOT_SUPPORT)}return i}const fN={getAdapter:bq,adapters:Sx};function Zm(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Zu(null,e)}function ey(e){const t=B.toSafeFlatObject(e);return Zm(t),t.headers=sr.from(B.getSafeProp(t,"headers")),t.data=Qm.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),fN.getAdapter(t.adapter||Ju.adapter,t)(t).then(function(i){Zm(t),t.response=i;try{i.data=Qm.call(t,t.transformResponse,i)}finally{delete t.response}return i.headers=sr.from(i.headers),i},function(i){if(!iN(i)&&(Zm(t),i&&i.response)){t.response=i.response;try{i.response.data=Qm.call(t,t.transformResponse,i.response)}finally{delete t.response}i.response.headers=sr.from(i.response.headers)}return Promise.reject(i)})}const lh={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{lh[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const wE={};lh.transitional=function(t,r,n){function i(o,s){return"[Axios v"+_x+"] Transitional option '"+o+"'"+s+(n?". "+n:"")}return(o,s,u)=>{if(t===!1)throw new de(i(s," has been removed"+(r?" in "+r:"")),de.ERR_DEPRECATED);return r&&!wE[s]&&(wE[s]=!0,console.warn(i(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,s,u):!0}};lh.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function wq(e,t,r){if(typeof e!="object"||e===null)throw new de("options must be an object",de.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],s=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(s){const u=e[o],c=u===void 0||s(u,o,e);if(c!==!0)throw new de("option "+o+" must be "+c,de.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new de("Unknown option "+o,de.ERR_BAD_OPTION)}}const Gf={assertOptions:wq,validators:lh},nr=Gf.validators;let Fo=class{constructor(t){this.defaults=t||{},this.interceptors={request:new sE,response:new sE}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error)try{let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack;let s="";if(typeof o=="string"){const u=o.indexOf(` `);s=u===-1?"":o.slice(u+1)}if(!n.stack)n.stack=s;else if(s){const u=s.indexOf(` `),c=u===-1?-1:s.indexOf(` `,u+1),d=c===-1?"":s.slice(c+1);String(n.stack).endsWith(d)||(n.stack+=` `+s)}}catch{}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Vo(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:o}=r;n!==void 0&&Gf.assertOptions(n,{silentJSONParsing:nr.transitional(nr.boolean),forcedJSONParsing:nr.transitional(nr.boolean),clarifyTimeoutError:nr.transitional(nr.boolean),legacyInterceptorReqResOrdering:nr.transitional(nr.boolean),advertiseZstdAcceptEncoding:nr.transitional(nr.boolean),validateStatusUndefinedResolves:nr.transitional(nr.boolean)},!1),i!=null&&(B.isFunction(i)?r.paramsSerializer={serialize:i}:Gf.assertOptions(i,{encode:nr.function,serialize:nr.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Gf.assertOptions(r,{baseUrl:nr.spelling("baseURL"),withXsrfToken:nr.spelling("withXSRFToken")},!0),r.method=(B.getSafeProp(r,"method")||B.getSafeProp(this.defaults,"method")||"get").toLowerCase();let s=o&&B.merge(o.common,o[r.method]);o&&B.forEach(nN.concat("common"),S=>{delete o[S]}),r.headers=sr.concat(s,o);const u=[];let c=!0;this.interceptors.request.forEach(function(w){if(typeof w.runWhen=="function"&&w.runWhen(r)===!1)return;c=c&&w.synchronous;const v=r.transitional||wx;v&&v.legacyInterceptorReqResOrdering?u.unshift(w.fulfilled,w.rejected):u.push(w.fulfilled,w.rejected)});const d=[];this.interceptors.response.forEach(function(w){d.push(w.fulfilled,w.rejected)});let p,h=0,y;if(!c){const S=[ey.bind(this),void 0];for(S.unshift(...u),S.push(...d),y=S.length,p=Promise.resolve(r);hey.call(this,b)))}catch(x){p=Promise.reject(x)}break}}if(!p)try{p=ey.call(this,b)}catch(S){p=Promise.reject(S)}for(h=0,y=d.length;h{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](i);n._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(u=>{n.subscribe(u),o=u}).then(i);return s.cancel=function(){n.unsubscribe(o)},s},t(function(o,s,u){n.reason||(n.reason=new Zu(o,s,u),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new dN(function(i){t=i}),cancel:t}}};function _q(e){return function(r){return e.apply(null,r)}}function Sq(e){return B.isObject(e)&&e.isAxiosError===!0}const Yf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Yf).forEach(([e,t])=>{Yf[t]===void 0&&(Yf[t]=e)});function hN(e){const t=new Fo(e),r=DR(Fo.prototype.request,t);return B.extend(r,Fo.prototype,t,{allOwnKeys:!0}),B.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return hN(Vo(e,i))},r}const At=hN(Ju);At.Axios=Fo;At.CanceledError=Zu;At.CancelToken=xq;At.isCancel=iN;At.VERSION=_x;At.toFormData=sh;At.AxiosError=de;At.Cancel=At.CanceledError;At.all=function(t){return Promise.all(t)};At.spread=_q;At.isAxiosError=Sq;At.mergeConfig=Vo;At.AxiosHeaders=sr;At.formToJSON=e=>rN(B.isHTMLForm(e)?new FormData(e):e);At.getAdapter=fN.getAdapter;At.HttpStatusCode=Yf;At.default=At;const{Axios:pne,AxiosError:mne,CanceledError:yne,isCancel:gne,CancelToken:vne,VERSION:bne,all:wne,Cancel:xne,isAxiosError:_ne,spread:Sne,toFormData:One,AxiosHeaders:Ene,HttpStatusCode:Ane,formToJSON:Pne,getAdapter:Tne,mergeConfig:Cne,create:kne}=At,pN=typeof window>"u",xE=!pN&&window.self!==window.top,Oq=!pN&&typeof document>"u",mN=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),Yt=[];for(let e=0;e<256;++e)Yt.push((e+256).toString(16).slice(1));function Eq(e,t=0){return(Yt[e[t+0]]+Yt[e[t+1]]+Yt[e[t+2]]+Yt[e[t+3]]+"-"+Yt[e[t+4]]+Yt[e[t+5]]+"-"+Yt[e[t+6]]+Yt[e[t+7]]+"-"+Yt[e[t+8]]+Yt[e[t+9]]+"-"+Yt[e[t+10]]+Yt[e[t+11]]+Yt[e[t+12]]+Yt[e[t+13]]+Yt[e[t+14]]+Yt[e[t+15]]).toLowerCase()}let ty;const Aq=new Uint8Array(16);function Pq(){if(!ty){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ty=crypto.getRandomValues.bind(crypto)}return ty(Aq)}const Tq=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),_E={randomUUID:Tq};function Cq(e,t,r){var i;e=e||{};const n=e.random??((i=e.rng)==null?void 0:i.call(e))??Pq();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Eq(n)}function kq(e,t,r){return _E.randomUUID&&!e?_E.randomUUID():Cq(e)}const Tl=typeof window<"u"?window:{base44SharedInstances:{}};function jq(e,t){return Tl.base44SharedInstances||(Tl.base44SharedInstances={}),Tl.base44SharedInstances[e]||(Tl.base44SharedInstances[e]={instance:t()}),Tl.base44SharedInstances[e].instance}const Rq="__user_heartbeat_event__",Nq="__initialization_event__",Mq="__session_duration_event__",SE="analytics-enable",OE="base44_analytics_session_id",Iq={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},$q="analytics",Qe=jq($q,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,fallbackSessionId:null,config:{...Iq,...Hq()}})),Dq=({axiosClient:e,serverUrl:t,appId:r,userAuthModule:n,enabled:i})=>{var o;const{maxQueueSize:s,throttleTime:u,batchSize:c}=Qe.config;if(!i||!(!((o=Qe.config)===null||o===void 0)&&o.enabled)||Oq)return{track:()=>{},cleanup:()=>{}};let d;const p=`${t}/api/apps/${r}/analytics/track/batch`,h=async P=>{await e.request({method:"POST",url:`/apps/${r}/analytics/track/batch`,data:{events:P}})},y=P=>{try{const E=JSON.stringify({events:P}),T=new Blob([E],{type:"application/json"});return typeof navigator>"u"||E.length>6e4||!navigator.sendBeacon(p,T)}catch{return!1}},b=async(P,E={})=>{if(P.length===0)return;const T=await zq(n),j=P.map(Uq(T));try{(!E.isBeacon||!y(j))&&await h(j)}catch{}},S=()=>{AE(b,{throttleTime:u,batchSize:c})},w=P=>{if(Qe.requestsQueue.length>=s)return;const E=qq();Qe.requestsQueue.push({...P,...E}),S()},v=()=>{AE(b,{throttleTime:u,batchSize:c}),d=PE(w),Bq()},x=()=>{EE(),d==null||d(),Fq(w);const P=Qe.requestsQueue.splice(0);b(P,{isBeacon:!0})},O=()=>{typeof window>"u"||(document.visibilityState==="hidden"?x():document.visibilityState==="visible"&&v())},A=()=>{EE(),d==null||d(),typeof window<"u"&&window.removeEventListener("visibilitychange",O)};return S(),d=PE(w),Lq(w),typeof window<"u"&&window.addEventListener("visibilitychange",O),{track:w,cleanup:A}};function EE(){Qe.isProcessing=!1}async function AE(e,t){if(Qe.isProcessing)return;Qe.isProcessing=!0;const{throttleTime:r=1e3,batchSize:n=30}=t??{};for(;Qe.isProcessing&&Qe.requestsQueue.length>0;){const i=Qe.requestsQueue.splice(0,n);i.length&&await e(i),await new Promise(o=>setTimeout(o,r))}Qe.isProcessing=!1}function PE(e){var t;if(typeof window>"u"||Qe.isHeartBeatProcessing||((t=Qe.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};Qe.isHeartBeatProcessing=!0;const r=setInterval(()=>{e({eventName:Rq})},Qe.config.heartBeatInterval);return()=>{clearInterval(r),Qe.isHeartBeatProcessing=!1}}function Lq(e){typeof window>"u"||Qe.wasInitializationTracked||(Qe.wasInitializationTracked=!0,e({eventName:Nq,properties:{referrer:document==null?void 0:document.referrer}}))}function Bq(){typeof window>"u"||Qe.sessionStartTime!==null||(Qe.sessionStartTime=new Date().toISOString())}function Fq(e){if(typeof window>"u"||Qe.sessionStartTime===null)return;const t=new Date().getTime()-new Date(Qe.sessionStartTime).getTime();Qe.sessionStartTime=null,e({eventName:Mq,properties:{sessionDuration:t}})}function qq(){var e,t;return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"&&(t=(e=window.location)===null||e===void 0?void 0:e.pathname)!==null&&t!==void 0?t:null}}function Uq(e){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...e})}let Fl=null;function TE(){Qe.sessionContext=null,Fl=null}async function zq(e){if(!Qe.sessionContext){if(!e.hasToken())return{user_id:null,session_id:ld()};if(!Fl){const n=ld();Fl=e.me().then(i=>({user_id:i.id,session_id:n})).catch(()=>({user_id:null,session_id:n}))}const t=Fl,r=await t;return Fl===t&&(Qe.sessionContext=r),r}return Qe.sessionContext}function Hq(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(SE);if(t==null||!t.length)return;const r=new URLSearchParams(window.location.search);r.delete(SE);const n=window.location.pathname+(r.toString()?"?"+r.toString():"");return window.history.replaceState({},"",n),{enabled:t==="true"}}function CE(){var e;return(e=Qe.fallbackSessionId)!==null&&e!==void 0?e:Qe.fallbackSessionId=mN()}function ld(){if(typeof window>"u")return CE();try{const e=localStorage.getItem(OE);if(!e){const t=mN();return localStorage.setItem(OE,t),t}return e}catch{return CE()}}class Wq extends Error{constructor(t,r,n,i,o){super(t),this.name="Base44Error",this.status=r,this.code=n,this.data=i,this.originalError=o}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function Na({baseURL:e,headers:t={},token:r,interceptResponses:n=!0,onError:i}){const o=At.create({baseURL:e,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return r&&(o.defaults.headers.common.Authorization=`Bearer ${r}`),o.interceptors.request.use(s=>{typeof window<"u"&&(window.location&&s.headers.set("X-Origin-URL",window.location.href),s.headers.get("Authorization")||s.headers.set("X-Base44-Anonymous-Id",ld()));const u=kq();if(s.requestId=u,xE)try{window.parent.postMessage({type:"api-request-start",requestId:u,data:{url:e+s.url,method:s.method,body:s.data instanceof FormData?"[FormData object]":s.data}},"*")}catch{}return s}),n&&o.interceptors.response.use(s=>{var u;const c=(u=s.config)===null||u===void 0?void 0:u.requestId;try{xE&&c&&window.parent.postMessage({type:"api-request-end",requestId:c,data:{statusCode:s.status,response:s.data}},"*")}catch{}return s.data},s=>{var u,c,d,p,h,y,b,S,w,v,x,O,A,P,E;const T=((c=(u=s.response)===null||u===void 0?void 0:u.data)===null||c===void 0?void 0:c.message)||((p=(d=s.response)===null||d===void 0?void 0:d.data)===null||p===void 0?void 0:p.detail)||s.message,j=new Wq(T,(h=s.response)===null||h===void 0?void 0:h.status,(O=(S=(b=(y=s.response)===null||y===void 0?void 0:y.data)===null||b===void 0?void 0:b.code)!==null&&S!==void 0?S:(x=(v=(w=s.response)===null||w===void 0?void 0:w.headers)===null||v===void 0?void 0:v.get)===null||x===void 0?void 0:x.call(v,"x-base44-connector-error"))!==null&&O!==void 0?O:(P=(A=s.response)===null||A===void 0?void 0:A.headers)===null||P===void 0?void 0:P["x-base44-connector-error"],(E=s.response)===null||E===void 0?void 0:E.data,s);return i==null||i(j),Promise.reject(j)}),o}function kE(e){const{axios:t,appId:r,getSocket:n}=e;return new Proxy({},{get(i,o){if(!(typeof o!="string"||o==="then"||o.startsWith("_")))return Kq(t,r,o,n)}})}function Vq(e){var t;try{const r=JSON.parse(e);return{type:r.type,data:r.data,id:r.id||((t=r.data)===null||t===void 0?void 0:t.id),timestamp:r.timestamp||new Date().toISOString()}}catch(r){return console.warn("[Base44 SDK] Failed to parse realtime message:",r),null}}function Kq(e,t,r,n){const i=`/apps/${t}/entities/${r}`;return{async list(o,s,u,c){const d={};return o&&(d.sort=o),s&&(d.limit=s),u&&(d.skip=u),c&&(d.fields=Array.isArray(c)?c.join(","):c),e.get(i,{params:d})},async filter(o,s,u,c,d){const p={q:JSON.stringify(o)};return s&&(p.sort=s),u&&(p.limit=u),c&&(p.skip=c),d&&(p.fields=Array.isArray(d)?d.join(","):d),e.get(i,{params:p})},async get(o){return e.get(`${i}/${o}`)},async create(o){return e.post(i,o)},async update(o,s){return e.put(`${i}/${o}`,s)},async delete(o){return e.delete(`${i}/${o}`)},async deleteMany(o){return e.delete(i,{data:o})},async bulkCreate(o){return e.post(`${i}/bulk`,o)},async updateMany(o,s){return e.patch(`${i}/update-many`,{query:o,data:s})},async bulkUpdate(o){return e.put(`${i}/bulk`,o)},async importEntities(o){const s=new FormData;return s.append("file",o,o.name),e.post(`${i}/import`,s,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(o){const s=`entities:${t}:${r}`;return n().subscribeToRoom(s,{update_model:d=>{var p;const h=Vq(d.data);if(h){h.type!=="delete"&&(!((p=h.data)===null||p===void 0)&&p._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${r}#${h.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${r}.get("${h.id}")\` to fetch the full record.`);try{o(h)}catch(y){console.error("[Base44 SDK] Subscription callback error:",y)}}}})}}}function Xq(e,t){return{async call(r,n,i){if(!(r!=null&&r.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(n!=null&&n.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:o,queryParams:s,...u}=i??{},c={...u,...o&&{path_params:o},...s&&{query_params:s}};return await e.post(`/apps/${t}/integrations/custom/${r}/${n}`,c)}}}function jE(e,t){const r=Xq(e,t);return new Proxy({},{get(n,i){if(!(typeof i!="string"||i==="then"||i.startsWith("_")))return i==="custom"?r:new Proxy({},{get(o,s){if(!(typeof s!="string"||s==="then"||s.startsWith("_")))return async u=>{if(typeof u=="string")throw new Error(`Integration ${s} must receive an object with named parameters, received: ${u}`);let c,d;return u instanceof FormData||u&&Object.values(u).some(p=>p instanceof File)?(c=new FormData,Object.keys(u).forEach(p=>{u[p]instanceof File?c.append(p,u[p],u[p].name):typeof u[p]=="object"&&u[p]!==null?c.append(p,JSON.stringify(u[p])):c.append(p,u[p])}),d="multipart/form-data"):(c=u,d="application/json"),i==="Core"?e.post(`/apps/${t}/integration-endpoints/Core/${s}`,c||u,{headers:{"Content-Type":d}}):e.post(`/apps/${t}/integration-endpoints/installable/${i}/integration-endpoints/${s}`,c||u,{headers:{"Content-Type":d}})}}})}})}function Gq(){return typeof window>"u"?!1:window!==window.parent}function Yq(e,t,r){const o=Math.round(window.screenX+(window.outerWidth-500)/2),s=Math.round(window.screenY+(window.outerHeight-600)/2),u=window.open(e,"base44_auth",`width=500,height=600,left=${o},top=${s},resizable=yes,scrollbars=yes`);if(!u)return;const c=()=>{window.removeEventListener("message",d),clearInterval(p),u.closed||u.close()},d=h=>{var y;if(h.origin!==r||h.source!==u||!(!((y=h.data)===null||y===void 0)&&y.access_token))return;c();const b=new URL(t),{access_token:S,is_new_user:w}=h.data;b.searchParams.set("access_token",S),w!=null&&b.searchParams.set("is_new_user",String(w)),window.location.href=b.toString()},p=setInterval(()=>{u.closed&&c()},500);window.addEventListener("message",d)}function Qq(e,t,r,n){let i=null;const o=()=>{i=null};let s=!!n.token;return{hasToken(){return s},async me(){const u=i??e.get(`/apps/${r}/entities/User/me`).finally(()=>{i===u&&(i=null)});return i=u,u},async updateMe(u){return e.put(`/apps/${r}/entities/User/me`,u)},redirectToLogin(u){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const c=u?new URL(u,window.location.origin).toString():window.location.href,d=`${n.appBaseUrl}/login?from_url=${encodeURIComponent(c)}`;window.location.href=d},loginWithProvider(u,c="/"){const d=new URL(c,window.location.origin).toString(),p=`app_id=${r}&from_url=${encodeURIComponent(d)}`;let h;u==="sso"?h=`/apps/${r}/auth/sso/login`:h=`/apps/auth${u==="google"?"":`/${u}`}/login`;const y=`${n.appBaseUrl}/api${h}?${p}`;if(Gq()){const b=`${y}&popup_origin=${encodeURIComponent(window.location.origin)}`;return Yq(b,d,window.location.origin)}window.location.href=y},logout(u){if(delete e.defaults.headers.common.Authorization,o(),TE(),s=!1,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(p){console.error("Failed to remove token from localStorage:",p)}const c=u||window.location.href,d=`${n.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(c)}`;window.location.href=d}},setToken(u,c=!0){if(u&&(o(),TE(),s=!0,e.defaults.headers.common.Authorization=`Bearer ${u}`,t.defaults.headers.common.Authorization=`Bearer ${u}`,c&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",u),window.localStorage.setItem("token",u)}catch(d){console.error("Failed to save token to localStorage:",d)}},async loginViaEmailPassword(u,c,d){var p;try{const h=await e.post(`/apps/${r}/auth/login`,{email:u,password:c,...d&&{turnstile_token:d}}),{access_token:y,user:b}=h;return y&&this.setToken(y),{access_token:y,user:b}}catch(h){throw((p=h.response)===null||p===void 0?void 0:p.status)===401&&await this.logout(),h}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(u,c){return e.post(`/apps/${r}/users/invite-user`,{user_email:u,role:c})},register(u){return e.post(`/apps/${r}/auth/register`,u)},verifyOtp({email:u,otpCode:c}){return e.post(`/apps/${r}/auth/verify-otp`,{email:u,otp_code:c})},resendOtp(u){return e.post(`/apps/${r}/auth/resend-otp`,{email:u})},resetPasswordRequest(u){return e.post(`/apps/${r}/auth/reset-password-request`,{email:u})},resetPassword({resetToken:u,newPassword:c}){return e.post(`/apps/${r}/auth/reset-password`,{reset_token:u,new_password:c})},changePassword({userId:u,currentPassword:c,newPassword:d}){return e.post(`/apps/${r}/auth/change-password`,{user_id:u,current_password:c,new_password:d})}}}function Jq(e,t){return{async getAccessToken(r){const n=`/apps/${t}/auth/sso/accesstoken/${r}`;return e.get(n)},async getIdToken(r){const n=`/apps/${t}/auth/sso/idtoken/${r}`;return e.get(n)}}}const Zq=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD"]);function e8(e,t){return{async getAccessToken(r){if(!r||typeof r!="string")throw new Error("Integration type is required and must be a string");return(await e.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(r)}`)).access_token},async getConnection(r){var n;if(!r||typeof r!="string")throw new Error("Integration type is required and must be a string");const o=await e.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(r)}`);return{accessToken:o.access_token,connectionConfig:(n=o.connection_config)!==null&&n!==void 0?n:null}},async getWorkspaceConnection(r){var n;if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");const o=await e.get(`/apps/${t}/external-auth/tokens/connectors/${encodeURIComponent(r)}`);return{accessToken:o.access_token,connectionConfig:(n=o.connection_config)!==null&&n!==void 0?n:null}},async getCurrentAppUserAccessToken(r){if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");return(await e.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(r)}/token`)).access_token},async getCurrentAppUserConnection(r){var n;if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");const o=await e.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(r)}/token`);return{accessToken:o.access_token,connectionConfig:(n=o.connection_config)!==null&&n!==void 0?n:null}},async callApi(r,n){return yN(r,"Integration type"),t8(e,`/apps/${t}/connectors/${encodeURIComponent(r)}/call`,n)}}}function yN(e,t){if(!e||typeof e!="string")throw new Error(`${t} is required and must be a string`)}async function t8(e,t,r){var n,i,o,s,u,c,d,p,h;if(!r||typeof r!="object")throw new Error("Request is required and must be an object");yN(r.path,"Request path");const y=(n=r.method)!==null&&n!==void 0?n:"GET";if(!Zq.has(y))throw new Error("Request method must be one of GET, POST, PUT, PATCH, DELETE, or HEAD");const S=await e.post(t,{method:y,...r.host==null?{}:{host:r.host},path:r.path,query:(i=r.query)!==null&&i!==void 0?i:{},headers:(o=r.headers)!==null&&o!==void 0?o:{},body:(s=r.body)!==null&&s!==void 0?s:null});return{success:S.success,phase:S.phase,status:(u=S.status_code)!==null&&u!==void 0?u:null,data:S.data,dataBase64:(c=S.data_base64)!==null&&c!==void 0?c:null,contentType:(d=S.content_type)!==null&&d!==void 0?d:null,headers:(p=S.headers)!==null&&p!==void 0?p:{},creditsCharged:(h=S.credits_charged)!==null&&h!==void 0?h:0}}function r8(e,t){return{async connectAppUser(r){if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");return(await e.post(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(r)}/initiate`)).redirect_url},async disconnectAppUser(r){if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");await e.delete(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(r)}`)}}}function Fi(e={}){const{storageKey:t="base44_access_token",paramName:r="access_token",saveToStorage:n=!0,removeFromUrl:i=!0}=e;let o=null;if(typeof window<"u"&&window.location)try{const s=new URLSearchParams(window.location.search);if(o=s.get(r),o){if(n&&n8(o,{storageKey:t}),i){s.delete(r);const u=`${window.location.pathname}${s.toString()?`?${s.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,u)}return o}}catch(s){console.error("Error retrieving token from URL:",s)}if(typeof window<"u"&&window.localStorage)try{return o=window.localStorage.getItem(t),o}catch(s){console.error("Error retrieving token from local storage:",s)}return null}function n8(e,t){const{storageKey:r="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!e)return!1;try{return window.localStorage.setItem(r,e),window.localStorage.setItem("token",e),!0}catch(n){return console.error("Error saving token to local storage:",n),!1}}function i8({axios:e,serviceRoleAxios:t,appId:r,serverUrl:n,functionsVersion:i,platformHeaders:o}){const s=new Headers(o),u=c=>{const d=c.defaults.headers.common.Authorization;return typeof d=="string"&&d.startsWith("Bearer ")?d:null};return async function(d,p={}){o8(d);const{fetch:h=fetch,...y}=p,b=new Headers(p.headers),S=(w,v)=>{v&&!b.has(w)&&b.set(w,v)};return S("Authorization",u(e)),S("Base44-Service-Authorization",u(t)),S("Base44-App-Id",r),S("Base44-Api-Url",n),S("Base44-Functions-Version",i),S("Base44-State",s.get("Base44-State")),S("X-Data-Env",s.get("X-Data-Env")),h(d,{...y,headers:b})}}function o8(e){if(typeof e!="string"||e==="")throw new Error("fetchWithAuth() requires a path, such as '/api/orders'.");const t=e.replace(/[\t\n\r]/g,"").replace(/^[\x00-\x20]+/,"");if(!t.startsWith("/")||t.startsWith("//")||t.startsWith("/\\"))throw new Error(`fetchWithAuth() only sends requests to your app's own origin, so your app's credentials never reach a third party. "${e}" is not a path on it — pass a relative path such as '/api/orders'. Use base44.functions.fetch() to call a Base44 backend function, or plain fetch() for another origin.`)}function RE(e,t,r){const n=(o,s)=>o?`${String(o).replace(/\/$/,"")}${s}`:s,i=o=>{const s=new Headers;if(r!=null&&r.getAuthHeaders){const u=r.getAuthHeaders();Object.entries(u).forEach(([c,d])=>{d!=null&&s.set(c,String(d))})}return o&&new Headers(o).forEach((u,c)=>{s.set(c,u)}),s};return{async invoke(o,s){if(typeof s=="string")throw new Error(`Function ${o} must receive an object with named parameters, received: ${s}`);let u,c;return s instanceof FormData||s&&Object.values(s).some(d=>d instanceof File)?(u=new FormData,Object.keys(s).forEach(d=>{s[d]instanceof File?u.append(d,s[d],s[d].name):typeof s[d]=="object"&&s[d]!==null?u.append(d,JSON.stringify(s[d])):u.append(d,s[d])}),c="multipart/form-data"):(u=s,c="application/json"),e.post(`/apps/${t}/functions/${o}`,u||s,{headers:{"Content-Type":c}})},async fetch(o,s={}){const c=`/functions${o.startsWith("/")?o:`/${o}`}`,d=i(s.headers),p={...s,headers:d};return await fetch(n(r==null?void 0:r.baseURL,c),p)}}}function NE({axios:e,getSocket:t,appId:r,serverUrl:n,token:i}){const o=`/apps/${r}/agents`,s={},u=()=>e.get(`${o}/conversations`),c=w=>e.get(`${o}/conversations/${w}`);return{getConversations:u,getConversation:c,listConversations:w=>e.get(`${o}/conversations`,{params:w}),createConversation:w=>e.post(`${o}/conversations`,w),addMessage:async(w,v)=>e.post(`${o}/conversations/v2/${w.id}/messages`,v),subscribeToConversation:(w,v)=>{const x=`/agent-conversations/${w}`,O=t(),A=c(w).then(P=>(s[w]=P,P));return O.subscribeToRoom(x,{connect:()=>{},update_model:async({data:P})=>{const E=JSON.parse(P);if(E._message){await A;const T=E._message,j=s[w];if(j){const R=j.messages||[],N=R.findIndex(q=>q.id===T.id),V=N!==-1?R.map((q,L)=>L===N?T:q):[...R,T];s[w]={...j,messages:V},v==null||v(s[w])}}}})},getWhatsAppConnectURL:w=>{const v=`${n}/api/apps/${r}/agents/${encodeURIComponent(w)}/whatsapp`,x=i??Fi();return x?`${v}?token=${x}`:v},getTelegramConnectURL:w=>{const v=`${n}/api/apps/${r}/agents/${encodeURIComponent(w)}/telegram`,x=i??Fi();return x?`${v}?token=${x}`:v}}}function ME({serverUrl:e,token:t,appId:r}){return{connection:()=>{var i;return{baseURL:`${e}/api/apps/${r}/ai/openai/v1`,token:(i=t??Fi())!==null&&i!==void 0?i:""}}}}function IE(e,t){const r=`/app-logs/${t}`;return{async logUserInApp(n){await e.post(`${r}/log-user-in-app/${n}`)},async fetchLogs(n={}){return await e.get(r,{params:n})},async getStats(n={}){return await e.get(`${r}/stats`,{params:n})}}}function a8(e,t){return{async getPublicSettings(){return e.get(`/apps/public/prod/public-settings/by-id/${t}`)}}}function s8(e,t){return{async inviteUser(r,n){if(n!=="user"&&n!=="admin")throw new Error(`Invalid role: "${n}". Role must be either "user" or "admin".`);return await e.post(`/apps/${t}/runtime/users/invite-user`,{user_email:r,role:n})}}}const Tn=Object.create(null);Tn.open="0";Tn.close="1";Tn.ping="2";Tn.pong="3";Tn.message="4";Tn.upgrade="5";Tn.noop="6";const Qf=Object.create(null);Object.keys(Tn).forEach(e=>{Qf[Tn[e]]=e});const Rb={type:"error",data:"parser error"},gN=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",vN=typeof ArrayBuffer=="function",bN=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Ox=({type:e,data:t},r,n)=>gN&&t instanceof Blob?r?n(t):$E(t,n):vN&&(t instanceof ArrayBuffer||bN(t))?r?n(t):$E(new Blob([t]),n):n(Tn[e]+(t||"")),$E=(e,t)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];t("b"+(n||""))},r.readAsDataURL(e)};function DE(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let ry;function l8(e,t){if(gN&&e.data instanceof Blob)return e.data.arrayBuffer().then(DE).then(t);if(vN&&(e.data instanceof ArrayBuffer||bN(e.data)))return t(DE(e.data));Ox(e,!1,r=>{ry||(ry=new TextEncoder),t(ry.encode(r))})}const LE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ql=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,r=e.length,n,i=0,o,s,u,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const d=new ArrayBuffer(t),p=new Uint8Array(d);for(n=0;n>4,p[i++]=(s&15)<<4|u>>2,p[i++]=(u&3)<<6|c&63;return d},c8=typeof ArrayBuffer=="function",Ex=(e,t)=>{if(typeof e!="string")return{type:"message",data:wN(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:f8(e.substring(1),t)}:Qf[r]?e.length>1?{type:Qf[r],data:e.substring(1)}:{type:Qf[r]}:Rb},f8=(e,t)=>{if(c8){const r=u8(e);return wN(r,t)}else return{base64:!0,data:e}},wN=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},xN="",d8=(e,t)=>{const r=e.length,n=new Array(r);let i=0;e.forEach((o,s)=>{Ox(o,!1,u=>{n[s]=u,++i===r&&t(n.join(xN))})})},h8=(e,t)=>{const r=e.split(xN),n=[];for(let i=0;i{const n=r.length;let i;if(n<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,n);else if(n<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,n)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(n))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(r)})}})}let ny;function Pf(e){return e.reduce((t,r)=>t+r.length,0)}function Tf(e,t){if(e[0].length===t)return e.shift();const r=new Uint8Array(t);let n=0;for(let i=0;iMath.pow(2,21)-1){u.enqueue(Rb);break}i=p*Math.pow(2,32)+d.getUint32(4),n=3}else{if(Pf(r)e){u.enqueue(Rb);break}}}})}const _N=4;function Ct(e){if(e)return y8(e)}function y8(e){for(var t in Ct.prototype)e[t]=Ct.prototype[t];return e}Ct.prototype.on=Ct.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ct.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this};Ct.prototype.off=Ct.prototype.removeListener=Ct.prototype.removeAllListeners=Ct.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,i=0;iPromise.resolve().then(t):(t,r)=>r(t,0),Vr=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),g8="arraybuffer";function SN(e,...t){return t.reduce((r,n)=>(e.hasOwnProperty(n)&&(r[n]=e[n]),r),{})}const v8=Vr.setTimeout,b8=Vr.clearTimeout;function ch(e,t){t.useNativeTimers?(e.setTimeoutFn=v8.bind(Vr),e.clearTimeoutFn=b8.bind(Vr)):(e.setTimeoutFn=Vr.setTimeout.bind(Vr),e.clearTimeoutFn=Vr.clearTimeout.bind(Vr))}const w8=1.33;function x8(e){return typeof e=="string"?_8(e):Math.ceil((e.byteLength||e.size)*w8)}function _8(e){let t=0,r=0;for(let n=0,i=e.length;n=57344?r+=3:(n++,r+=4);return r}function ON(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function S8(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function O8(e){let t={},r=e.split("&");for(let n=0,i=r.length;n{this.readyState="paused",t()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};h8(t,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,d8(t,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=ON()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}}let EN=!1;try{EN=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const P8=EN;function T8(){}class C8 extends A8{constructor(t){if(super(t),typeof location<"u"){const r=location.protocol==="https:";let n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||n!==t.port}}doWrite(t,r){const n=this.request({method:"POST",data:t});n.on("success",r),n.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=t}}class On extends Ct{constructor(t,r,n){super(),this.createRequest=t,ch(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var t;const r=SN(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var i;n.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=On.requestsCount++,On.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=T8,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete On.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}On.requestsCount=0;On.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",BE);else if(typeof addEventListener=="function"){const e="onpagehide"in Vr?"pagehide":"unload";addEventListener(e,BE,!1)}}function BE(){for(let e in On.requests)On.requests.hasOwnProperty(e)&&On.requests[e].abort()}const k8=(function(){const e=AN({xdomain:!1});return e&&e.responseType!==null})();class j8 extends C8{constructor(t){super(t);const r=t&&t.forceBase64;this.supportsBinary=k8&&!r}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new On(AN,this.uri(),t)}}function AN(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||P8))return new XMLHttpRequest}catch{}if(!t)try{return new Vr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const PN=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class R8 extends Ax{get name(){return"websocket"}doOpen(){const t=this.uri(),r=this.opts.protocols,n=PN?{}:SN(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,r,n)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let r=0;r{try{this.doWrite(n,o)}catch{}i&&uh(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=ON()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}}const iy=Vr.WebSocket||Vr.MozWebSocket;class N8 extends R8{createSocket(t,r,n){return PN?new iy(t,r,n):r?new iy(t,r):new iy(t)}doWrite(t,r){this.ws.send(r)}}class M8 extends Ax{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const r=m8(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(r).getReader(),i=p8();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const o=()=>{n.read().then(({done:u,value:c})=>{u||(this.onPacket(c),o())}).catch(u=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let r=0;r{i&&uh(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const I8={websocket:N8,webtransport:M8,polling:j8},$8=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,D8=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Nb(e){if(e.length>8e3)throw"URI too long";const t=e,r=e.indexOf("["),n=e.indexOf("]");r!=-1&&n!=-1&&(e=e.substring(0,r)+e.substring(r,n).replace(/:/g,";")+e.substring(n,e.length));let i=$8.exec(e||""),o={},s=14;for(;s--;)o[D8[s]]=i[s]||"";return r!=-1&&n!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=L8(o,o.path),o.queryKey=B8(o,o.query),o}function L8(e,t){const r=/\/{2,9}/g,n=t.replace(r,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&n.splice(0,1),t.slice(-1)=="/"&&n.splice(n.length-1,1),n}function B8(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,i,o){i&&(r[i]=o)}),r}const Mb=typeof addEventListener=="function"&&typeof removeEventListener=="function",Jf=[];Mb&&addEventListener("offline",()=>{Jf.forEach(e=>e())},!1);class Hi extends Ct{constructor(t,r){if(super(),this.binaryType=g8,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(r=t,t=null),t){const n=Nb(t);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=Nb(r.host).host);ch(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(n=>{const i=n.prototype.name;this.transports.push(i),this._transportsByName[i]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=O8(this.opts.query)),Mb&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Jf.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const r=Object.assign({},this.opts.query);r.EIO=_N,r.transport=t,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Hi.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(t);r.open(),this.setTransport(r)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",Hi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=t.data,this._onError(r);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let n=0;n0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,uh(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,r,n){return this._sendPacket("message",t,r,n),this}send(t,r,n){return this._sendPacket("message",t,r,n),this}_sendPacket(t,r,n,i){if(typeof r=="function"&&(i=r,r=void 0),typeof n=="function"&&(i=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const o={type:t,data:r,options:n};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),t()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}_onError(t){if(Hi.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Mb&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=Jf.indexOf(this._offlineEventListener);n!==-1&&Jf.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this._prevBufferLen=0}}}Hi.protocol=_N;class F8 extends Hi{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",h=>{if(!n)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Hi.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(p(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const y=new Error("probe error");y.transport=r.name,this.emitReserved("upgradeError",y)}}))};function o(){n||(n=!0,p(),r.close(),r=null)}const s=h=>{const y=new Error("probe error: "+h);y.transport=r.name,o(),this.emitReserved("upgradeError",y)};function u(){s("transport closed")}function c(){s("socket closed")}function d(h){r&&h.name!==r.name&&o()}const p=()=>{r.removeListener("open",i),r.removeListener("error",s),r.removeListener("close",u),this.off("close",c),this.off("upgrading",d)};r.once("open",i),r.once("error",s),r.once("close",u),this.once("close",c),this.once("upgrading",d),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const r=[];for(let n=0;nI8[i]).filter(i=>!!i)),super(t,n)}};function U8(e,t="",r){let n=e;r=r||typeof location<"u"&&location,e==null&&(e=r.protocol+"//"+r.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=r.protocol+e:e=r.host+e),/^(https?|wss?):\/\//.test(e)||(typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),n=Nb(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const o=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+o+":"+n.port+t,n.href=n.protocol+"://"+o+(r&&r.port===n.port?"":":"+n.port),n}const z8=typeof ArrayBuffer=="function",H8=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,TN=Object.prototype.toString,W8=typeof Blob=="function"||typeof Blob<"u"&&TN.call(Blob)==="[object BlobConstructor]",V8=typeof File=="function"||typeof File<"u"&&TN.call(File)==="[object FileConstructor]";function Px(e){return z8&&(e instanceof ArrayBuffer||H8(e))||W8&&e instanceof Blob||V8&&e instanceof File}function Zf(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,n=e.length;r=0&&e.num{delete this.acks[t];for(let u=0;u{this.io.clearTimeoutFn(o),r.apply(this,u)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...r){return new Promise((n,i)=>{const o=(s,u)=>s?i(s):n(u);o.withError=!0,r.push(o),this.emit(t,...r)})}_addToQueue(t){let r;typeof t[t.length-1]=="function"&&(r=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>(this._queue[0],i!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(i)):(this._queue.shift(),r&&r(null,...o)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!t||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:We.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(n=>String(n.id)===t)){const n=this.acks[t];delete this.acks[t],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case We.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case We.EVENT:case We.BINARY_EVENT:this.onevent(t);break;case We.ACK:case We.BINARY_ACK:this.onack(t);break;case We.DISCONNECT:this.ondisconnect();break;case We.CONNECT_ERROR:this.destroy();const n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n);break}}onevent(t){const r=t.data||[];t.id!=null&&r.push(this.ack(t.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const r=this;let n=!1;return function(...i){n||(n=!0,r.packet({type:We.ACK,id:t,data:i}))}}onack(t){const r=this.acks[t.id];typeof r=="function"&&(delete this.acks[t.id],r.withError&&t.data.unshift(null),r.apply(this,t.data))}onconnect(t,r){this.id=t,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:We.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const r=this._anyListeners;for(let n=0;n0&&e.jitter<=1?e.jitter:0,this.attempts=0}ks.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-r:e+r}return Math.min(e,this.max)|0};ks.prototype.reset=function(){this.attempts=0};ks.prototype.setMin=function(e){this.ms=e};ks.prototype.setMax=function(e){this.max=e};ks.prototype.setJitter=function(e){this.jitter=e};class Db extends Ct{constructor(t,r){var n;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(r=t,t=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,ch(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new ks({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=t;const i=r.parser||J8;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var r;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(r=this.backoff)===null||r===void 0||r.setMin(t),this)}randomizationFactor(t){var r;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(r=this.backoff)===null||r===void 0||r.setJitter(t),this)}reconnectionDelayMax(t){var r;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(r=this.backoff)===null||r===void 0||r.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new q8(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const i=fn(r,"open",function(){n.onopen(),t&&t()}),o=u=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",u),t?t(u):this.maybeReconnectOnOpen()},s=fn(r,"error",o);if(this._timeout!==!1){const u=this._timeout,c=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),r.close()},u);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(fn(t,"ping",this.onping.bind(this)),fn(t,"data",this.ondata.bind(this)),fn(t,"error",this.onerror.bind(this)),fn(t,"close",this.onclose.bind(this)),fn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(r){this.onclose("parse error",r)}}ondecoded(t){uh(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,r){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new CN(this,t,r),this.nsps[t]=n),n}_destroy(t){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active)return;this._close()}_packet(t){const r=this.encoder.encode(t);for(let n=0;nt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,r){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Cl={};function ed(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const r=U8(e,t.path||"/socket.io"),n=r.source,i=r.id,o=r.path,s=Cl[i]&&o in Cl[i].nsps,u=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let c;return u?c=new Db(n,t):(Cl[i]||(Cl[i]=new Db(n,t)),c=Cl[i]),r.query&&!t.query&&(t.query=r.queryKey),c.socket(r.path,t)}Object.assign(ed,{Manager:Db,Socket:CN,io:ed,connect:ed});const e6=250;function qE(e,t){var r;const n=(r=e.token)!==null&&r!==void 0?r:Fi(),i={app_id:e.appId,token:n};n||(i.anonymous_id=ld());const o=ed(e.serverUrl,{path:e.mountPath,transports:e.transports,query:i});return o.on("connect",async()=>{var s;return console.log("connect",o.id),(s=t.connect)===null||s===void 0?void 0:s.call(t)}),o.on("update_model",async s=>{var u;return(u=t.update_model)===null||u===void 0?void 0:u.call(t,s)}),o.on("error",async s=>{var u;return(u=t.error)===null||u===void 0?void 0:u.call(t,s)}),o.on("connect_error",async s=>{var u;return console.error("connect_error",s),(u=t.error)===null||u===void 0?void 0:u.call(t,s)}),o}function t6({config:e}){let t={...e};const r={},n={},i={connect:async()=>{const x=[];Object.keys(r).forEach(O=>{const A=y(O);A.length!==0&&(d(O),A.forEach(({connect:P})=>{const E=async()=>P==null?void 0:P();x.push(E())}))}),await Promise.all(x)},update_model:async x=>{const A=y(x.room).map(P=>{var E;return(E=P.update_model)===null||E===void 0?void 0:E.call(P,x)});await Promise.all(A)},error:async x=>{console.error("error",x);const O=Object.values(r).flat().map(A=>{var P;return(P=A.error)===null||P===void 0?void 0:P.call(A,x)});await Promise.all(O)}};let o=qE(e,i);function s(){u()}function u(){S(),o&&o.disconnect()}function c(x){s(),t={...t,...x},o=qE(t,i)}function d(x){o.emit("join",x)}function p(x){o.emit("leave",x)}async function h(x,O){var A;const P=JSON.stringify(O);return(A=i.update_model)===null||A===void 0?void 0:A.call(i,{room:x,data:P})}function y(x){var O;return(O=r[x])!==null&&O!==void 0?O:[]}function b(x){const O=n[x];O&&(clearTimeout(O),delete n[x])}function S(){Object.keys(n).forEach(x=>{var O,A;clearTimeout(n[x]),delete n[x],((A=(O=r[x])===null||O===void 0?void 0:O.length)!==null&&A!==void 0?A:0)===0&&delete r[x]})}function w(x){b(x),n[x]=setTimeout(()=>{var O,A;delete n[x],!(((A=(O=r[x])===null||O===void 0?void 0:O.length)!==null&&A!==void 0?A:0)>0)&&(p(x),delete r[x])},e6)}return{socket:o,subscribeToRoom:(x,O)=>{r[x]?b(x):(d(x),r[x]=[]),r[x].push(O);let A=!1;return()=>{var P,E;A||(A=!0,r[x]=(E=(P=r[x])===null||P===void 0?void 0:P.filter(T=>T!==O))!==null&&E!==void 0?E:[],r[x].length===0&&w(x))}},updateConfig:c,updateModel:h,disconnect:u}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` PartySocket requires a global 'EventTarget' class to be available! You can polyfill this global by adding this to your code before any partysocket imports: \`\`\` import 'partysocket/event-target-polyfill'; \`\`\` Please file an issue at https://github.com/partykit/partykit if you're still having trouble. `);var kN=class extends Event{constructor(t,r){super("error",r);lt(this,"message");lt(this,"error");this.message=t.message,this.error=t}},jN=class extends Event{constructor(t=1e3,r="",n){super("close",n);lt(this,"code");lt(this,"reason");lt(this,"wasClean",!0);this.code=t,this.reason=r}},oy={Event,ErrorEvent:kN,CloseEvent:jN};function r6(e,t){if(!e)throw new Error(t)}function n6(e){return new e.constructor(e.type,e)}function i6(e){return"data"in e?new MessageEvent(e.type,e):"code"in e||"reason"in e?new jN(e.code||1999,e.reason||"unknown reason",e):"error"in e?new kN(e.error,e):new Event(e.type,e)}var W2,o6=typeof process<"u"&&typeof((W2=process.versions)==null?void 0:W2.node)<"u"&&typeof document>"u",Cf=o6?i6:n6,yo={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},UE=!1,a6=class wo extends EventTarget{constructor(r,n,i={}){super();lt(this,"_ws");lt(this,"_retryCount",-1);lt(this,"_uptimeTimeout");lt(this,"_connectTimeout");lt(this,"_shouldReconnect",!0);lt(this,"_connectLock",!1);lt(this,"_binaryType","blob");lt(this,"_closeCalled",!1);lt(this,"_messageQueue",[]);lt(this,"_url");lt(this,"_protocols");lt(this,"_options");lt(this,"onclose",null);lt(this,"onerror",null);lt(this,"onmessage",null);lt(this,"onopen",null);lt(this,"_handleOpen",r=>{this._debug("open event");const{minUptime:n=yo.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),n),r6(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(i=>{var o;return(o=this._ws)==null?void 0:o.send(i)}),this._messageQueue=[],this.onopen&&this.onopen(r),this.dispatchEvent(Cf(r))});lt(this,"_handleMessage",r=>{this._debug("message event"),this.onmessage&&this.onmessage(r),this.dispatchEvent(Cf(r))});lt(this,"_handleError",r=>{this._debug("error event",r.message),this._disconnect(void 0,r.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(r),this._debug("exec error listeners"),this.dispatchEvent(Cf(r)),this._connect()});lt(this,"_handleClose",r=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(r),this.dispatchEvent(Cf(r))});this._url=r,this._protocols=n,this._options=i,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return wo.CONNECTING}get OPEN(){return wo.OPEN}get CLOSING(){return wo.CLOSING}get CLOSED(){return wo.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(r){this._binaryType=r,this._ws&&(this._ws.binaryType=r)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((n,i)=>(typeof i=="string"?n+=i.length:i instanceof Blob?n+=i.size:n+=i.byteLength,n),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?wo.CLOSED:wo.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(r=1e3,n){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(r,n)}reconnect(r,n){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(r,n),this._connect())}send(r){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",r),this._ws.send(r);else{const{maxEnqueuedMessages:n=yo.maxEnqueuedMessages}=this._options;this._messageQueue.length",...r])}_getNextDelay(){const{reconnectionDelayGrowFactor:r=yo.reconnectionDelayGrowFactor,minReconnectionDelay:n=yo.minReconnectionDelay,maxReconnectionDelay:i=yo.maxReconnectionDelay}=this._options;let o=0;return this._retryCount>0&&(o=n*Math.pow(r,this._retryCount-1),o>i&&(o=i)),this._debug("next delay",o),o}_wait(){return new Promise(r=>{setTimeout(r,this._getNextDelay())})}_getNextProtocols(r){if(!r)return Promise.resolve(null);if(typeof r=="string"||Array.isArray(r))return Promise.resolve(r);if(typeof r=="function"){const n=r();if(!n)return Promise.resolve(null);if(typeof n=="string"||Array.isArray(n))return Promise.resolve(n);if(n.then)return n}throw Error("Invalid protocols")}_getNextUrl(r){if(typeof r=="string")return Promise.resolve(r);if(typeof r=="function"){const n=r();if(typeof n=="string")return Promise.resolve(n);if(n.then)return n}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;const{maxRetries:r=yo.maxRetries,connectionTimeout:n=yo.connectionTimeout}=this._options;if(this._retryCount>=r){this._debug("max retries reached",this._retryCount,">=",r);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([i,o])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!UE&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. For example, if you're using node.js, run \`npm install ws\`, and then in your code: import PartySocket from 'partysocket'; import WS from 'ws'; const partysocket = new PartySocket({ host: "127.0.0.1:1999", room: "test-room", WebSocket: WS }); `),UE=!0);const s=this._options.WebSocket||WebSocket;this._debug("connect",{url:i,protocols:o}),this._ws=o?new s(i,o):new s(i),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),n)}).catch(i=>{this._connectLock=!1,this._handleError(new oy.ErrorEvent(Error(i.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new oy.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(r=1e3,n){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(r,n),this._handleClose(new oy.CloseEvent(r,n,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! * Reconnecting WebSocket * by Pedro Ladaria * https://github.com/pladaria/reconnecting-websocket * License MIT */const s6=1e3,l6=3e3,u6=new Set([405,409,422,503]),c6=new Set([400,403,404]);function f6(e){const t=e&&typeof e=="object"?e.status:void 0;return typeof t=="number"?t:void 0}function d6(e){return e instanceof Error?e:new Error(String(e))}class h6{constructor(t,r,n,i,o){var s;this.onClose=o,this.listeners=new Set,this.heartbeat=null,this.closed=!1,this.id=(s=i==null?void 0:i.id)!==null&&s!==void 0?s:crypto.randomUUID();let u=n.transport==="proxy";const c=async()=>{var y;if(this.closed)throw new Error("Actor connection is closed");if(!u)try{const{websocket_url:b,token:S}=await n.mintConnectionToken(t,r,this.id),w=b.includes("?")?"&":"?";return`${b}${w}token=${encodeURIComponent(S)}`}catch(b){const S=f6(b);if(!(n.transport!=="direct"&&S!==void 0&&u6.has(S))){S!==void 0&&c6.has(S)&&this.close();try{(y=n.onMintError)===null||y===void 0||y.call(n,d6(b))}catch{}throw b}u=!0}return m6(n.host,t,r,this.id,n.appId,n.getAuthToken(),n.functionsVersion)},d=new a6(c);this.ws=d;let p=Date.now();const h=()=>{p=Date.now()};d.addEventListener("open",h),d.addEventListener("message",y=>{h();let b;try{b=JSON.parse(y.data)}catch{return}if((b&&typeof b=="object"?b.type:void 0)!=="__pong")for(const w of this.listeners)w(b)}),this.heartbeat=setInterval(()=>{if(Date.now()-p>l6){h(),d.readyState===d.OPEN&&d.reconnect();return}try{d.send(JSON.stringify({type:"__ping"}))}catch{}},s6)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.closed||this.ws.send(JSON.stringify(t))}close(){this.closed||(this.closed=!0,this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose())}}function p6(e,t,r,n){let i=null;return{connect(o){if(i)return i;const s=new h6(e,t,r,o,()=>{n.delete(s),i===s&&(i=null)});return i=s,n.add(s),s}}}function m6(e,t,r,n,i,o,s){let u=e.replace(/^(http|https|ws|wss):\/\//,"");u.endsWith("/")&&(u=u.slice(0,-1));const c=u.startsWith("localhost:")||u.startsWith("127.0.0.1:")||u.startsWith("192.168.")||u.startsWith("10.")||u.startsWith("172.")&&u.split(".")[1]>="16"&&u.split(".")[1]<="31"||u.startsWith("[::ffff:7f00:1]:"),d=new URLSearchParams([["_pk",n],["app_id",i],["handler",t]]);return o&&d.append("token",o),s&&d.append("fv",s),`${c?"ws":"wss"}://${u}/parties/${t}/${r}?${d}`}function y6(e,t){return e&&!e.startsWith("/")?e:t??e}function g6(e){const t=new Set;return{module:new Proxy({},{get(n,i){if(!(typeof i!="string"||i==="then"))return o=>p6(i,o,e,t)}}),closeAll:()=>{for(const n of[...t])n.close()}}}function v6(e){var t,r,n,i;const{serverUrl:o="https://base44.app",appId:s,analytics:u,token:c,serviceToken:d,requiresAuth:p=!1,appBaseUrl:h,options:y,functionsVersion:b,headers:S}=e,w=typeof h=="string"?h:"",v={serverUrl:o,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:s,token:c};let x=null;const O=()=>(x||(x=t6({config:v})),x),A={...S,"X-App-Id":String(s)},P=b?{...A,"Base44-Functions-Version":b}:A,E=Na({baseURL:`${o}/api`,headers:A,token:c,onError:y==null?void 0:y.onError}),T=Na({baseURL:`${o}/api`,headers:P,token:c,interceptResponses:!1,onError:y==null?void 0:y.onError}),j={...A,...c?{"on-behalf-of":`Bearer ${c}`}:{}},R=Na({baseURL:`${o}/api`,headers:j,token:d,onError:y==null?void 0:y.onError}),N=Na({baseURL:`${o}/api`,headers:P,token:d,interceptResponses:!1}),V=Na({baseURL:`${o}/api`,headers:A}),q=Qq(E,T,s,{appBaseUrl:w,token:c});if(typeof window<"u"){const Z=c||Fi();Z&&q.setToken(Z)}const L=g6({appId:s,host:y6(o,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:b,getAuthToken:()=>c||Fi(),mintConnectionToken:async(Z,te,G)=>{const re=c||Fi();return await V.post(`/apps/${s}/actors/${encodeURIComponent(Z)}/connection-token`,{room:te,connection_id:G},{headers:{...re?{Authorization:`Bearer ${re}`}:{},...b?{"Base44-Functions-Version":b}:{}}})},transport:y==null?void 0:y.actorsTransport,onMintError:y==null?void 0:y.onError}),K={entities:kE({axios:E,appId:s,getSocket:O}),integrations:jE(E,s),connectors:r8(E,s),auth:q,functions:RE(T,s,{getAuthHeaders:()=>{const Z={},te=c||Fi();return te&&(Z.Authorization=`Bearer ${te}`),Z},baseURL:(r=T.defaults)===null||r===void 0?void 0:r.baseURL}),agents:NE({axios:E,getSocket:O,appId:s,serverUrl:o,token:c}),aiGateway:ME({serverUrl:o,token:c,appId:s}),appLogs:IE(E,s),app:a8(E,s),users:s8(E,s),analytics:Dq({axiosClient:E,serverUrl:o,appId:s,userAuthModule:q,enabled:(n=u==null?void 0:u.enabled)!==null&&n!==void 0?n:!0}),actors:L.module,cleanup:()=>{K.analytics.cleanup(),L.closeAll(),x&&x.disconnect()}},Y={entities:kE({axios:R,appId:s,getSocket:O}),integrations:jE(R,s),sso:Jq(R,s),connectors:e8(R,s),functions:RE(N,s,{getAuthHeaders:()=>{const Z={};return d&&(Z.Authorization=`Bearer ${d}`),Z},baseURL:(i=N.defaults)===null||i===void 0?void 0:i.baseURL}),agents:NE({axios:R,getSocket:O,appId:s,serverUrl:o,token:c}),aiGateway:ME({serverUrl:o,token:d,appId:s}),appLogs:IE(R,s),cleanup:()=>{x&&x.disconnect()}};return p&&typeof window<"u"&&setTimeout(async()=>{try{await K.auth.isAuthenticated()||K.auth.redirectToLogin(window.location.href)}catch(Z){console.error("Authentication check failed:",Z),K.auth.redirectToLogin(window.location.href)}},0),{...K,fetchWithAuth:i8({axios:E,serviceRoleAxios:R,appId:String(s),serverUrl:o,functionsVersion:b,platformHeaders:S}),setToken(Z){K.auth.setToken(Z),x&&x.updateConfig({token:Z}),v.token=Z},getConfig(){return{serverUrl:o,appId:s,requiresAuth:p}},get asServiceRole(){if(!d)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return Y}}}const RN=typeof window>"u",b6=RN?{localStorage:new Map}:window,Kl=b6.localStorage,w6=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),ka=(e,{defaultValue:t=void 0,removeFromUrl:r=!1}={})=>{if(RN)return t;const n=`base44_${w6(e)}`,i=new URLSearchParams(window.location.search),o=i.get(e);if(r){i.delete(e);const u=`${window.location.pathname}${i.toString()?`?${i.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,u)}if(o)return Kl.setItem(n,o),o;if(t)return Kl.setItem(n,t),t;const s=Kl.getItem(n);return s||null},x6=()=>(ka("clear_access_token")==="true"&&(Kl.removeItem("base44_access_token"),Kl.removeItem("token")),{appId:ka("app_id",{defaultValue:"6a2ad42fe373c5b9a8b9303d"}),token:ka("access_token",{removeFromUrl:!0}),fromUrl:ka("from_url",{defaultValue:window.location.href}),functionsVersion:ka("functions_version",{defaultValue:"prod"}),appBaseUrl:ka("app_base_url",{defaultValue:void 0})}),Ul={...x6()},{appId:_6,token:S6,functionsVersion:O6,appBaseUrl:E6}=Ul,Ao=v6({appId:_6,token:S6,functionsVersion:O6,serverUrl:"",requiresAuth:!1,appBaseUrl:E6});function A6({}){var i;const t=Ps().pathname.substring(1),{data:r,isFetched:n}=l4({queryKey:["user"],queryFn:async()=>{try{return{user:await Ao.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return C.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:C.jsx("div",{className:"max-w-md w-full",children:C.jsxs("div",{className:"text-center space-y-6",children:[C.jsxs("div",{className:"space-y-2",children:[C.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),C.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),C.jsxs("div",{className:"space-y-3",children:[C.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),C.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",C.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),n&&r.isAuthenticated&&((i=r.user)==null?void 0:i.role)==="admin"&&C.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:C.jsxs("div",{className:"flex items-start space-x-3",children:[C.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:C.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),C.jsxs("div",{className:"text-left space-y-1",children:[C.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),C.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),C.jsx("div",{className:"pt-6",children:C.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[C.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const NN=$.createContext(),P6=({children:e})=>{const[t,r]=$.useState(null),[n,i]=$.useState(!1),[o,s]=$.useState(!0),[u,c]=$.useState(!0),[d,p]=$.useState(null),[h,y]=$.useState(!1),[b,S]=$.useState(null);$.useEffect(()=>{w()},[]);const w=async()=>{var A,P;try{c(!0),p(null);const E=Na({baseURL:"/api/apps/public",headers:{"X-App-Id":Ul.appId},token:Ul.token,interceptResponses:!0});try{const T=await E.get(`/prod/public-settings/by-id/${Ul.appId}`);S(T),Ul.token?await v():(s(!1),i(!1),y(!0)),c(!1)}catch(T){if(console.error("App state check failed:",T),T.status===403&&((P=(A=T.data)==null?void 0:A.extra_data)!=null&&P.reason)){const j=T.data.extra_data.reason;p(j==="auth_required"?{type:"auth_required",message:"Authentication required"}:j==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:j,message:T.message})}else p({type:"unknown",message:T.message||"Failed to load app"});c(!1),s(!1)}}catch(E){console.error("Unexpected error:",E),p({type:"unknown",message:E.message||"An unexpected error occurred"}),c(!1),s(!1)}},v=async()=>{try{s(!0);const A=await Ao.auth.me();r(A),i(!0),s(!1),y(!0)}catch(A){console.error("User auth check failed:",A),s(!1),i(!1),y(!0),(A.status===401||A.status===403)&&p({type:"auth_required",message:"Authentication required"})}},x=(A=!0)=>{r(null),i(!1),A?Ao.auth.logout(window.location.href):Ao.auth.logout()},O=()=>{Ao.auth.redirectToLogin(window.location.href)};return C.jsx(NN.Provider,{value:{user:t,isAuthenticated:n,isLoadingAuth:o,isLoadingPublicSettings:u,authError:d,appPublicSettings:b,authChecked:h,logout:x,navigateToLogin:O,checkUserAuth:v,checkAppState:w},children:e})},T6=()=>{const e=$.useContext(NN);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},C6=()=>C.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:C.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:C.jsxs("div",{className:"text-center",children:[C.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:C.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),C.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),C.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),C.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[C.jsx("p",{children:"If you believe this is an error, you can:"}),C.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[C.jsx("li",{children:"Verify you are logged in with the correct account"}),C.jsx("li",{children:"Contact the app administrator for access"}),C.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),k6=e=>{const t=e.slice(1);try{return decodeURIComponent(t)}catch{return t}};function j6(){const{pathname:e,hash:t}=Ps(),r=B4();return $.useEffect(()=>{if(r!=="POP"){if(t){const n=k6(t),i=window.setTimeout(()=>{var o;(o=document.getElementById(n))==null||o.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(i)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[e,t,r]),null}const zE=[{href:"#how",label:"How It Works"},{href:"#states",label:"State Coins"},{href:"#stats",label:"Market Data"},{href:"#blockchain",label:"BTBX Chain"},{href:"#claim",label:"Claim CHX"}];function R6(){const[e,t]=$.useState(!1);return C.jsxs("nav",{className:"fixed top-0 left-0 right-0 z-50 rise-anim",style:{height:78,background:"rgba(11,24,34,0.8)",backdropFilter:"blur(18px)",borderBottom:"1px solid rgba(191,218,226,0.14)"},children:[C.jsxs("div",{className:"max-w-[1180px] mx-auto h-full px-6 md:px-[70px] flex items-center justify-between",children:[C.jsxs("div",{className:"flex items-center gap-3",style:{color:"#f3f8fa",fontSize:15,fontWeight:750,letterSpacing:"0.12em"},children:[C.jsx("div",{className:"grid place-items-center",style:{width:35,height:35,border:"1px solid #31aaa5",borderRadius:9,color:"#75ded5",fontSize:12,letterSpacing:"-0.08em",fontWeight:800,boxShadow:"0 0 25px rgba(49,170,165,0.2)"},children:"CHX"}),C.jsx("span",{children:"CHEX COIN"})]}),C.jsx("div",{className:"hidden md:flex items-center gap-[29px]",children:zE.map(r=>C.jsx("a",{href:r.href,className:"transition-colors duration-200",style:{color:"#9fb2bc",fontSize:11,fontWeight:650,letterSpacing:"0.08em",textTransform:"uppercase"},onMouseEnter:n=>n.currentTarget.style.color="#71d4cd",onMouseLeave:n=>n.currentTarget.style.color="#9fb2bc",children:r.label},r.href))}),C.jsx("div",{className:"hidden md:flex items-center gap-3",children:C.jsxs(Tb,{to:"/dashboard",className:"flex items-center gap-1.5 transition-all duration-200",style:{padding:"12px 18px",border:"1px solid rgba(92,206,197,0.5)",borderRadius:5,color:"#9de4df",fontSize:11,fontWeight:650,letterSpacing:"0.08em",textTransform:"uppercase"},onMouseEnter:r=>{r.currentTarget.style.background="#123b41",r.currentTarget.style.boxShadow="0 8px 22px rgba(0,0,0,0.2)"},onMouseLeave:r=>{r.currentTarget.style.background="transparent",r.currentTarget.style.boxShadow="none"},children:[C.jsx(TO,{size:13})," Dashboard"]})}),C.jsx("button",{onClick:()=>t(!e),className:"md:hidden",style:{color:"#75ded5"},children:e?C.jsx(sx,{className:"w-6 h-6"}):C.jsx(CB,{className:"w-6 h-6"})})]}),e&&C.jsxs("div",{className:"md:hidden px-6 py-4 space-y-1",style:{background:"rgba(11,24,34,0.98)",borderBottom:"1px solid rgba(191,218,226,0.14)"},children:[zE.map(r=>C.jsx("a",{href:r.href,onClick:()=>t(!1),className:"block py-2.5 transition-colors",style:{color:"#9fb2bc",fontSize:12,fontWeight:650,letterSpacing:"0.08em",textTransform:"uppercase"},children:r.label},r.href)),C.jsxs(Tb,{to:"/dashboard",onClick:()=>t(!1),className:"flex items-center gap-1.5 py-2.5",style:{color:"#9de4df",fontSize:12,fontWeight:650,letterSpacing:"0.08em",textTransform:"uppercase"},children:[C.jsx(TO,{size:14})," Dashboard"]})]})]})}const N6="https://media.base44.com/images/public/6a2ad42fe373c5b9a8b9303d/dc883bd47_generated_a1efcd17.jpg";function M6({totalEquity:e,totalUnits:t,totalCoins:r}){const[n,i]=$.useState(0),[o,s]=$.useState(0);return $.useEffect(()=>{const u=e,d=u/(2e3/16);let p=0;const h=setInterval(()=>{p=Math.min(p+d,u),i(Math.floor(p)),p>=u&&clearInterval(h)},16);return()=>clearInterval(h)},[e]),$.useEffect(()=>{const u=r,d=u/(2500/16);let p=0;const h=setInterval(()=>{p=Math.min(p+d,u),s(Math.floor(p)),p>=u&&clearInterval(h)},16);return()=>clearInterval(h)},[r]),C.jsxs(C.Fragment,{children:[C.jsxs("section",{className:"relative overflow-hidden grid grid-cols-1 gap-12 lg:gap-[50px] lg:grid-cols-[1.08fr_0.92fr]",style:{minHeight:625,paddingTop:92,paddingBottom:110,alignItems:"center",paddingLeft:"5%",paddingRight:"5%"},children:[C.jsx("img",{src:N6,alt:"",className:"absolute inset-0 w-full h-full object-cover",style:{opacity:.32}}),C.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(90deg, #0c1822 0%, rgba(12,24,34,0.9) 45%, rgba(12,24,34,0.32) 100%)"}}),C.jsxs("div",{className:"relative z-10 rise-d1",children:[C.jsx("p",{className:"mb-[22px]",style:{color:"#65cec7",fontSize:11,fontWeight:700,letterSpacing:"0.2em",textTransform:"uppercase"},children:"BTBX Blockchain • Live Network"}),C.jsx("h1",{className:"mb-6",style:{maxWidth:610,color:"#f4f8fa",fontSize:"clamp(38px,5vw,57px)",lineHeight:1.03,letterSpacing:"-0.055em",fontWeight:760},children:"CHEX COIN"}),C.jsxs("p",{className:"mb-[34px]",style:{maxWidth:560,color:"#a9bbc4",fontSize:18,lineHeight:1.65},children:["The world's first ",C.jsx("span",{style:{color:"#70d1c9",fontWeight:700},children:"real estate equity-backed stablecoin"})," — where 1 dollar of verified property equity equals 1 CHX coin, issued on the ",C.jsx("span",{style:{color:"#70d1c9",fontWeight:700},children:"BTBX Blockchain"})," to every American homeowner."]}),C.jsxs("div",{className:"flex gap-3 flex-wrap",children:[C.jsx("a",{href:"#claim",className:"transition-all duration-200",style:{display:"inline-flex",alignItems:"center",padding:"15px 21px",borderRadius:5,background:"#2d9c98",color:"#07181c",border:"1px solid #55c6bf",fontSize:11,fontWeight:750,letterSpacing:"0.1em",textTransform:"uppercase"},onMouseEnter:u=>u.currentTarget.style.background="#62d4cc",onMouseLeave:u=>u.currentTarget.style.background="#2d9c98",children:"Claim Your CHX Coins"}),C.jsx("a",{href:"#states",className:"transition-all duration-200",style:{display:"inline-flex",alignItems:"center",padding:"15px 21px",borderRadius:5,border:"1px solid rgba(92,206,197,0.48)",color:"#a4e3df",background:"transparent",fontSize:11,fontWeight:750,letterSpacing:"0.1em",textTransform:"uppercase"},onMouseEnter:u=>{u.currentTarget.style.background="#12464a",u.currentTarget.style.color="#fff",u.currentTarget.style.boxShadow="0 12px 30px rgba(0,0,0,0.25)"},onMouseLeave:u=>{u.currentTarget.style.background="transparent",u.currentTarget.style.color="#a4e3df",u.currentTarget.style.boxShadow="none"},children:"Explore State Coins"}),C.jsx("a",{href:"#blockchain",className:"transition-all duration-200",style:{display:"inline-flex",alignItems:"center",padding:"15px 21px",borderRadius:5,border:"1px solid rgba(92,206,197,0.48)",color:"#a4e3df",background:"transparent",fontSize:11,fontWeight:750,letterSpacing:"0.1em",textTransform:"uppercase"},onMouseEnter:u=>{u.currentTarget.style.background="#12464a",u.currentTarget.style.color="#fff",u.currentTarget.style.boxShadow="0 12px 30px rgba(0,0,0,0.25)"},onMouseLeave:u=>{u.currentTarget.style.background="transparent",u.currentTarget.style.color="#a4e3df",u.currentTarget.style.boxShadow="none"},children:"BTBX Blockchain"})]})]}),C.jsx("div",{className:"relative z-10 grid place-items-center rise-d3",style:{height:340},children:C.jsxs("div",{className:"relative",style:{width:260,height:260,border:"1px solid rgba(88,201,194,0.4)",borderRadius:"50%",boxShadow:"0 0 80px rgba(24,139,135,0.18), inset 0 0 50px rgba(40,146,141,0.12)",animation:"drift 7s ease-in-out infinite"},children:[C.jsx("div",{className:"absolute",style:{inset:28,border:"1px solid rgba(148,190,204,0.25)",borderRadius:"50%",transform:"rotate(45deg) scaleX(1.5)"}}),C.jsx("div",{className:"absolute",style:{inset:53,border:"1px solid rgba(148,190,204,0.25)",borderRadius:"50%",transform:"rotate(-35deg) scaleX(1.6)"}}),C.jsx("div",{className:"absolute grid place-items-center",style:{inset:74,borderRadius:"50%",background:"linear-gradient(135deg, #83dad3, #157773 48%, #0b3a42)",border:"7px solid #b2efea",boxShadow:"0 0 0 8px rgba(66,181,175,0.17), 0 15px 55px rgba(0,0,0,0.45)",color:"#06252a",fontSize:29,fontWeight:800,letterSpacing:"-0.1em",animation:"coin-rotate 8s ease-in-out infinite"},children:"CHX"})]})})]}),C.jsx("div",{className:"relative z-10 mx-auto rise-d4 grid grid-cols-1 sm:grid-cols-3",style:{maxWidth:1180,margin:"-1px 5% 0",gap:1,background:"rgba(158,194,204,0.18)",border:"1px solid rgba(158,194,204,0.18)",boxShadow:"0 25px 65px rgba(0,0,0,0.26)"},children:[{label:"Total Backed Equity",value:`$${(n/1e3).toFixed(1)}T`,sub:"USD Residential Equity"},{label:"CHEX Coins Issuable",value:`${(o/1e12).toFixed(2)}T`,sub:"CHX Total Supply"},{label:"Eligible Properties",value:`${(t/1e6).toFixed(1)}M+`,sub:"Owner-Occupied Units"}].map((u,c)=>C.jsxs("div",{style:{padding:"25px 28px",background:"rgba(19,39,51,0.86)"},children:[C.jsx("strong",{style:{display:"block",color:"#eaf4f5",fontSize:28,letterSpacing:"-0.04em"},children:u.value}),C.jsx("span",{style:{display:"block",marginTop:7,color:"#8199a5",fontSize:10,fontWeight:700,letterSpacing:"0.12em",textTransform:"uppercase"},children:u.label}),C.jsx("span",{style:{display:"block",marginTop:4,color:"#5d717b",fontSize:11},children:u.sub})]},c))})]})}const En={California:{symbol:"CHX-CA",color:"#FF6B35",accent:"#FFD700",icon:"🌴",gradient:"from-orange-500 to-yellow-400",ring:"#FF6B35",abbr:"CA"},Texas:{symbol:"CHX-TX",color:"#1B4F8A",accent:"#C8A951",icon:"⭐",gradient:"from-blue-700 to-yellow-500",ring:"#C8A951",abbr:"TX"},Florida:{symbol:"CHX-FL",color:"#00B4D8",accent:"#F77F00",icon:"🌊",gradient:"from-cyan-400 to-orange-400",ring:"#00B4D8",abbr:"FL"},"New York":{symbol:"CHX-NY",color:"#2D3A8C",accent:"#F4D03F",icon:"🗽",gradient:"from-indigo-700 to-yellow-400",ring:"#F4D03F",abbr:"NY"},Pennsylvania:{symbol:"CHX-PA",color:"#003087",accent:"#FFD700",icon:"🔔",gradient:"from-blue-800 to-yellow-400",ring:"#FFD700",abbr:"PA"},Illinois:{symbol:"CHX-IL",color:"#003DA5",accent:"#FF0000",icon:"🏙️",gradient:"from-blue-700 to-red-500",ring:"#003DA5",abbr:"IL"},Ohio:{symbol:"CHX-OH",color:"#BB0000",accent:"#666666",icon:"🌻",gradient:"from-red-600 to-gray-500",ring:"#BB0000",abbr:"OH"},Georgia:{symbol:"CHX-GA",color:"#BA0C2F",accent:"#FFFFFF",icon:"🍑",gradient:"from-red-700 to-pink-300",ring:"#BA0C2F",abbr:"GA"},"North Carolina":{symbol:"CHX-NC",color:"#003DA5",accent:"#E50000",icon:"🌲",gradient:"from-blue-700 to-red-500",ring:"#E50000",abbr:"NC"},Michigan:{symbol:"CHX-MI",color:"#00274C",accent:"#FFCB05",icon:"🌊",gradient:"from-blue-900 to-yellow-400",ring:"#FFCB05",abbr:"MI"},"New Jersey":{symbol:"CHX-NJ",color:"#006DB7",accent:"#FFCB00",icon:"🏗️",gradient:"from-blue-600 to-yellow-400",ring:"#FFCB00",abbr:"NJ"},Virginia:{symbol:"CHX-VA",color:"#003366",accent:"#B8A36A",icon:"🌿",gradient:"from-blue-900 to-amber-400",ring:"#B8A36A",abbr:"VA"},Washington:{symbol:"CHX-WA",color:"#005C22",accent:"#4CA64C",icon:"🌲",gradient:"from-green-800 to-green-400",ring:"#4CA64C",abbr:"WA"},Arizona:{symbol:"CHX-AZ",color:"#CC0000",accent:"#003DA5",icon:"🌵",gradient:"from-red-600 to-blue-700",ring:"#CC0000",abbr:"AZ"},Massachusetts:{symbol:"CHX-MA",color:"#003087",accent:"#E31937",icon:"🦞",gradient:"from-blue-800 to-red-500",ring:"#E31937",abbr:"MA"},Tennessee:{symbol:"CHX-TN",color:"#003DA5",accent:"#BF0A30",icon:"🎵",gradient:"from-blue-700 to-red-600",ring:"#BF0A30",abbr:"TN"},Colorado:{symbol:"CHX-CO",color:"#003DA5",accent:"#BF0A30",icon:"⛰️",gradient:"from-blue-700 to-red-500",ring:"#003DA5",abbr:"CO"},Indiana:{symbol:"CHX-IN",color:"#002D62",accent:"#E1C16E",icon:"🏎️",gradient:"from-blue-900 to-yellow-500",ring:"#002D62",abbr:"IN"},Missouri:{symbol:"CHX-MO",color:"#003DA5",accent:"#E31837",icon:"🌉",gradient:"from-blue-700 to-red-500",ring:"#E31837",abbr:"MO"},Maryland:{symbol:"CHX-MD",color:"#CC0000",accent:"#FFD700",icon:"🦀",gradient:"from-red-600 to-yellow-400",ring:"#FFD700",abbr:"MD"},Wisconsin:{symbol:"CHX-WI",color:"#003DA5",accent:"#E31837",icon:"🧀",gradient:"from-blue-700 to-red-600",ring:"#003DA5",abbr:"WI"},Minnesota:{symbol:"CHX-MN",color:"#003DA5",accent:"#C8102E",icon:"❄️",gradient:"from-blue-700 to-red-500",ring:"#C8102E",abbr:"MN"},"South Carolina":{symbol:"CHX-SC",color:"#003DA5",accent:"#FFFFFF",icon:"🌴",gradient:"from-blue-700 to-cyan-300",ring:"#003DA5",abbr:"SC"},Alabama:{symbol:"CHX-AL",color:"#9B2335",accent:"#FFFFFF",icon:"🌹",gradient:"from-red-700 to-rose-300",ring:"#9B2335",abbr:"AL"},Louisiana:{symbol:"CHX-LA",color:"#003DA5",accent:"#C8102E",icon:"🎷",gradient:"from-blue-700 to-red-500",ring:"#C8102E",abbr:"LA"},Kentucky:{symbol:"CHX-KY",color:"#003DA5",accent:"#B8A36A",icon:"🐎",gradient:"from-blue-700 to-amber-400",ring:"#B8A36A",abbr:"KY"},Oregon:{symbol:"CHX-OR",color:"#003DA5",accent:"#FFD700",icon:"🌲",gradient:"from-blue-700 to-yellow-400",ring:"#FFD700",abbr:"OR"},Oklahoma:{symbol:"CHX-OK",color:"#003DA5",accent:"#E31837",icon:"🌾",gradient:"from-blue-700 to-red-500",ring:"#E31837",abbr:"OK"},Connecticut:{symbol:"CHX-CT",color:"#003DA5",accent:"#C8102E",icon:"⚓",gradient:"from-blue-700 to-red-600",ring:"#C8102E",abbr:"CT"},Utah:{symbol:"CHX-UT",color:"#BE0000",accent:"#003DA5",icon:"🏜️",gradient:"from-red-600 to-blue-700",ring:"#BE0000",abbr:"UT"},Iowa:{symbol:"CHX-IA",color:"#003DA5",accent:"#FFCD00",icon:"🌽",gradient:"from-blue-700 to-yellow-400",ring:"#FFCD00",abbr:"IA"},Nevada:{symbol:"CHX-NV",color:"#002868",accent:"#BF0A30",icon:"🎰",gradient:"from-blue-900 to-red-500",ring:"#BF0A30",abbr:"NV"},Arkansas:{symbol:"CHX-AR",color:"#BB0000",accent:"#003DA5",icon:"💎",gradient:"from-red-600 to-blue-700",ring:"#BB0000",abbr:"AR"},Mississippi:{symbol:"CHX-MS",color:"#BB0000",accent:"#003DA5",icon:"🌊",gradient:"from-red-600 to-blue-700",ring:"#003DA5",abbr:"MS"},Kansas:{symbol:"CHX-KS",color:"#003DA5",accent:"#FFCD00",icon:"🌻",gradient:"from-blue-700 to-yellow-400",ring:"#FFCD00",abbr:"KS"},"New Mexico":{symbol:"CHX-NM",color:"#FFD700",accent:"#BB0000",icon:"☀️",gradient:"from-yellow-400 to-red-600",ring:"#FFD700",abbr:"NM"},Nebraska:{symbol:"CHX-NE",color:"#E41C38",accent:"#FFD700",icon:"🌾",gradient:"from-red-500 to-yellow-400",ring:"#E41C38",abbr:"NE"},"West Virginia":{symbol:"CHX-WV",color:"#003DA5",accent:"#FFD700",icon:"⛏️",gradient:"from-blue-700 to-yellow-400",ring:"#FFD700",abbr:"WV"},Idaho:{symbol:"CHX-ID",color:"#003DA5",accent:"#FF0000",icon:"🥔",gradient:"from-blue-700 to-red-500",ring:"#FF0000",abbr:"ID"},Hawaii:{symbol:"CHX-HI",color:"#003DA5",accent:"#FF6B6B",icon:"🌺",gradient:"from-blue-700 to-pink-400",ring:"#FF6B6B",abbr:"HI"},"New Hampshire":{symbol:"CHX-NH",color:"#003DA5",accent:"#FFD700",icon:"🍂",gradient:"from-blue-700 to-yellow-400",ring:"#FFD700",abbr:"NH"},Maine:{symbol:"CHX-ME",color:"#003DA5",accent:"#C8102E",icon:"🦞",gradient:"from-blue-700 to-red-500",ring:"#C8102E",abbr:"ME"},"Rhode Island":{symbol:"CHX-RI",color:"#003DA5",accent:"#FFD700",icon:"⚓",gradient:"from-blue-700 to-yellow-400",ring:"#FFD700",abbr:"RI"},Montana:{symbol:"CHX-MT",color:"#003DA5",accent:"#C8102E",icon:"🦌",gradient:"from-blue-700 to-red-500",ring:"#C8102E",abbr:"MT"},Delaware:{symbol:"CHX-DE",color:"#0099CC",accent:"#FFD700",icon:"🏛️",gradient:"from-cyan-500 to-yellow-400",ring:"#0099CC",abbr:"DE"},"South Dakota":{symbol:"CHX-SD",color:"#003DA5",accent:"#FFD700",icon:"🦅",gradient:"from-blue-700 to-yellow-400",ring:"#FFD700",abbr:"SD"},"North Dakota":{symbol:"CHX-ND",color:"#003DA5",accent:"#009900",icon:"🌾",gradient:"from-blue-700 to-green-500",ring:"#003DA5",abbr:"ND"},Alaska:{symbol:"CHX-AK",color:"#003DA5",accent:"#FFD700",icon:"🐻",gradient:"from-blue-900 to-yellow-400",ring:"#FFD700",abbr:"AK"},Vermont:{symbol:"CHX-VT",color:"#003DA5",accent:"#009900",icon:"🍁",gradient:"from-blue-700 to-green-500",ring:"#009900",abbr:"VT"},Wyoming:{symbol:"CHX-WY",color:"#003DA5",accent:"#E31837",icon:"🦬",gradient:"from-blue-700 to-red-500",ring:"#E31837",abbr:"WY"},"District of Columbia":{symbol:"CHX-DC",color:"#CC0000",accent:"#FFFFFF",icon:"🏛️",gradient:"from-red-600 to-gray-200",ring:"#CC0000",abbr:"DC"}},td=e=>!e&&e!==0?"N/A":`$${Number(e).toLocaleString("en-US",{maximumFractionDigits:1})}B`,MN=e=>!e&&e!==0?"N/A":Number(e).toLocaleString("en-US"),ay=e=>!e&&e!==0?"N/A":`$${Number(e).toLocaleString("en-US",{maximumFractionDigits:0})}`,HE=[{s:"CA",val:"1,254.6B",chg:"+3.0%"},{s:"TX",val:"1,966.2B",chg:"+7.1%"},{s:"FL",val:"1,757.8B",chg:"+7.1%"},{s:"NY",val:"1,097.8B",chg:"+6.8%"},{s:"WA",val:"712.5B",chg:"+5.2%"},{s:"CO",val:"685.3B",chg:"+4.8%"},{s:"GA",val:"623.1B",chg:"+6.1%"},{s:"AZ",val:"598.4B",chg:"+5.9%"},{s:"NC",val:"567.2B",chg:"+5.5%"},{s:"VA",val:"542.8B",chg:"+4.9%"},{s:"PA",val:"550.4B",chg:"+2.5%"},{s:"IL",val:"489.3B",chg:"+3.2%"},{s:"OH",val:"423.1B",chg:"+3.8%"},{s:"MI",val:"398.7B",chg:"+4.2%"},{s:"NJ",val:"512.6B",chg:"+5.1%"}],I6=({item:e})=>C.jsxs("span",{className:"inline-flex items-center gap-2 mx-6",children:[C.jsxs("span",{style:{color:"#58c3bc",fontSize:11,fontWeight:700,letterSpacing:"0.08em"},children:["CHX-",e.s]}),C.jsx("span",{style:{color:"#72939e",fontSize:11,fontWeight:650,letterSpacing:"0.13em",textTransform:"uppercase"},children:e.val}),C.jsx("span",{style:{color:"#65cec7",fontSize:11,fontWeight:650},children:e.chg}),C.jsx("span",{style:{color:"rgba(164,198,208,0.2)",margin:"0 4px"},children:"•"})]});function $6(){const e=[...HE,...HE];return C.jsx("div",{className:"w-full overflow-hidden rise-anim",style:{padding:"18px 0",borderBottom:"1px solid rgba(164,198,208,0.13)",background:"rgba(9,21,29,0.6)",backdropFilter:"blur(8px)"},children:C.jsx("div",{className:"ticker-container",children:C.jsx("div",{className:"ticker-inner",children:e.map((t,r)=>C.jsx(I6,{item:t},r))})})})}const D6=[{num:"01",icon:"📄",title:"Submit Proof of Title",desc:"Upload your property deed, title insurance certificate, or county recorder document to verify ownership.",detail:"Accepted: Warranty Deed, Quitclaim Deed, Title Insurance Policy, County Grant Deed"},{num:"02",icon:"🏠",title:"Provide Appraised Value",desc:"Submit a licensed appraisal, recent tax assessment, or certified property valuation from an approved assessor.",detail:"Required: Licensed MAI Appraisal or State-Certified Tax Assessment (within 12 months)"},{num:"03",icon:"📊",title:"Declare All Encumbrances",desc:"List all mortgages, HELOCs, tax liens, mechanic's liens, HOA liens, and any other encumbrances against the property.",detail:"System integrates with county lien records and major mortgage servicers for automated verification"},{num:"04",icon:"🧮",title:"Net Equity Calculation",desc:"Our on-chain smart contract calculates: Appraised Value − All Debts & Liens = Net Equity (CHEX-eligible amount).",detail:"Formula: CHX Coins = Appraised Value − (∑ Mortgages + ∑ Liens + ∑ Encumbrances)"},{num:"05",icon:"⛓️",title:"BTBX Blockchain Registration",desc:"Your property's equity is registered as an immutable record on the BTBX Blockchain — publicly verifiable, cryptographically secured.",detail:"Each property receives a unique BTBX Property Hash (BPH) — the NFT-backed equity certificate"},{num:"06",icon:"💰",title:"CHX Coins Issued",desc:"1 dollar of verified net equity = 1 CHX coin. Coins are minted and sent directly to your submitted wallet address.",detail:"State-specific CHX-XX coins are issued, fully interoperable with the national CHX network"}];function L6(){return C.jsx("section",{id:"how",className:"relative grid-bg-slate rise-anim",style:{padding:"92px 5%",background:"#10212d",borderBottom:"1px solid rgba(176,207,216,0.1)"},children:C.jsxs("div",{className:"max-w-[1180px] mx-auto",children:[C.jsxs("div",{className:"mb-[42px]",style:{maxWidth:680},children:[C.jsx("p",{style:{margin:"0 0 13px",color:"#48aaa5",fontSize:11,fontWeight:750,letterSpacing:"0.18em",textTransform:"uppercase"},children:"How It Works"}),C.jsx("h2",{style:{color:"#edf6f7",fontSize:40,lineHeight:1.08,letterSpacing:"-0.045em",fontWeight:700,margin:0},children:"From verified equity to usable value."}),C.jsx("p",{style:{margin:"16px 0 0",color:"#90a8b2",lineHeight:1.7,fontSize:16},children:"A measured infrastructure for homeowners, institutions, and the next generation of property-backed finance."})]}),C.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-[18px]",children:D6.map((e,t)=>C.jsxs("article",{className:"transition-all duration-200",style:{padding:27,background:"rgba(30,53,66,0.64)",border:"1px solid rgba(165,203,211,0.16)",boxShadow:"0 18px 45px rgba(0,0,0,0.16)",minHeight:230},onMouseEnter:r=>{r.currentTarget.style.borderColor="rgba(90,202,194,0.55)",r.currentTarget.style.boxShadow="0 22px 48px rgba(0,0,0,0.25)",r.currentTarget.style.transform="translateY(-3px)"},onMouseLeave:r=>{r.currentTarget.style.borderColor="rgba(165,203,211,0.16)",r.currentTarget.style.boxShadow="0 18px 45px rgba(0,0,0,0.16)",r.currentTarget.style.transform="translateY(0)"},children:[C.jsxs("span",{style:{color:"#55c6bf",fontSize:12,fontWeight:800,letterSpacing:"0.1em"},children:["STEP ",e.num]}),C.jsxs("h3",{style:{margin:"22px 0 11px",color:"#eef6f7",fontSize:20,letterSpacing:"-0.02em",fontWeight:700},children:[C.jsx("span",{style:{marginRight:10},children:e.icon}),e.title]}),C.jsx("p",{style:{margin:"0 0 14px",color:"#91a9b3",fontSize:14,lineHeight:1.65},children:e.desc}),C.jsx("div",{style:{padding:12,borderRadius:6,background:"rgba(45,156,152,0.08)",border:"1px solid rgba(90,202,194,0.15)",color:"#7fa9ad",fontSize:12,lineHeight:1.55},children:e.detail})]},t))}),C.jsx("div",{className:"mt-10 p-4 text-center",style:{borderRadius:8,border:"1px solid rgba(72,170,165,0.18)",background:"rgba(45,156,152,0.05)"},children:C.jsxs("p",{style:{color:"#7fa9ad",fontSize:12,lineHeight:1.6,maxWidth:760,margin:"0 auto"},children:[C.jsx("span",{style:{color:"#48aaa5"},children:"⚠ Important:"})," All equity calculations are performed by immutable BTBX smart contracts. Submissions are subject to third-party verification. CHEX coins represent equity claims only and are non-transferable without identity verification. Consult applicable state and federal regulations."]})})]})})}function B6({metric:e,onClick:t}){const r=En[e.state]||{symbol:"CHX-??",color:"#2d9c98",accent:"#48aaa5",icon:"🏠",ring:"#2d9c98",abbr:"??"},n=e.residential_equity_b?(e.residential_equity_b*1e9).toFixed(0):"0",i=parseFloat(n)>=1e12?`${(parseFloat(n)/1e12).toFixed(2)}T`:parseFloat(n)>=1e9?`${(parseFloat(n)/1e9).toFixed(1)}B`:`${(parseFloat(n)/1e6).toFixed(0)}M`;return C.jsxs("div",{onClick:()=>t(e),className:"transition-all duration-200 cursor-pointer relative overflow-hidden",style:{padding:22,background:"rgba(30,53,66,0.64)",border:"1px solid rgba(165,203,211,0.16)",boxShadow:"0 18px 45px rgba(0,0,0,0.16)",borderRadius:8,borderLeft:`3px solid ${r.ring}`},onMouseEnter:o=>{o.currentTarget.style.borderColor="rgba(90,202,194,0.55)",o.currentTarget.style.boxShadow="0 22px 48px rgba(0,0,0,0.25)",o.currentTarget.style.transform="translateY(-3px)"},onMouseLeave:o=>{o.currentTarget.style.borderColor="rgba(165,203,211,0.16)",o.currentTarget.style.boxShadow="0 18px 45px rgba(0,0,0,0.16)",o.currentTarget.style.transform="translateY(0)"},children:[C.jsx("div",{className:"absolute",style:{top:-16,right:-16,width:80,height:80,borderRadius:"50%",background:r.color,opacity:.08,filter:"blur(20px)"}}),C.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[C.jsx("div",{className:"grid place-items-center flex-shrink-0",style:{width:44,height:44,borderRadius:"50%",background:`linear-gradient(135deg, ${r.color}, ${r.accent})`,color:"#fff",fontSize:13,fontWeight:800,boxShadow:`0 0 16px ${r.ring}40`},children:r.abbr}),C.jsxs("div",{className:"flex-1 min-w-0",children:[C.jsx("div",{style:{color:"#eef6f7",fontSize:14,fontWeight:700,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.state}),C.jsx("div",{style:{color:r.ring,fontSize:11,fontWeight:700,letterSpacing:"0.05em",marginTop:2},children:r.symbol})]}),C.jsx("div",{style:{fontSize:18},children:r.icon})]}),C.jsx("div",{className:"w-full mb-4",style:{height:1,background:"linear-gradient(90deg, transparent, rgba(90,202,194,0.25), transparent)"}}),C.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[C.jsxs("div",{children:[C.jsx("div",{style:{color:"#72939e",fontSize:10,fontWeight:700,letterSpacing:"0.1em",textTransform:"uppercase"},children:"Equity Backed"}),C.jsx("div",{style:{color:"#65cec7",fontSize:14,fontWeight:700,marginTop:2},children:td(e.residential_equity_b)})]}),C.jsxs("div",{children:[C.jsx("div",{style:{color:"#72939e",fontSize:10,fontWeight:700,letterSpacing:"0.1em",textTransform:"uppercase"},children:"CHX Issued"}),C.jsx("div",{style:{color:r.ring,fontSize:14,fontWeight:700,marginTop:2},children:i})]}),C.jsxs("div",{children:[C.jsx("div",{style:{color:"#72939e",fontSize:10,fontWeight:700,letterSpacing:"0.1em",textTransform:"uppercase"},children:"Properties"}),C.jsx("div",{style:{color:"#a9bbc4",fontSize:13,fontWeight:600,marginTop:2},children:MN(e.owner_occupied_units)})]}),C.jsxs("div",{children:[C.jsx("div",{style:{color:"#72939e",fontSize:10,fontWeight:700,letterSpacing:"0.1em",textTransform:"uppercase"},children:"Avg Equity/Unit"}),C.jsxs("div",{style:{color:"#a9bbc4",fontSize:13,fontWeight:600,marginTop:2},children:["$",e.avg_equity_per_unit?Number(e.avg_equity_per_unit).toLocaleString():"N/A"]})]})]}),C.jsxs("div",{className:"mt-4",children:[C.jsxs("div",{className:"flex justify-between mb-1",style:{fontSize:10,fontWeight:700,letterSpacing:"0.08em"},children:[C.jsxs("span",{style:{color:"#72939e"},children:["EQUITY · +",e.growth_trend,"%"]}),C.jsxs("span",{style:{color:r.ring},children:[e.equity_percentage,"%"]})]}),C.jsx("div",{style:{width:"100%",height:6,borderRadius:3,background:"rgba(255,255,255,0.06)",overflow:"hidden"},children:C.jsx("div",{style:{height:"100%",borderRadius:3,background:`linear-gradient(90deg, ${r.color}, ${r.accent})`,width:`${e.equity_percentage||0}%`,transformOrigin:"left",animation:"build-bar 1s ease both"}})})]})]})}function F6({metric:e,onClose:t}){const r=En[e.state]||{symbol:"CHX-??",color:"#2d9c98",accent:"#48aaa5",icon:"🏠",ring:"#2d9c98",abbr:"??"},n=e.residential_equity_b?e.residential_equity_b*1e9:0,i=n>=1e12?`${(n/1e12).toFixed(3)} Trillion`:`${(n/1e9).toFixed(2)} Billion`;return C.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[C.jsx("div",{className:"absolute inset-0",style:{background:"rgba(6,12,18,0.85)",backdropFilter:"blur(8px)"},onClick:t}),C.jsxs("div",{className:"relative z-10 w-full max-w-lg overflow-y-auto rise-anim",style:{maxHeight:"90vh",padding:32,borderRadius:12,background:"rgba(19,33,45,0.96)",border:`1px solid ${r.ring}40`,boxShadow:`0 0 60px ${r.ring}20`},children:[C.jsx("button",{onClick:t,className:"absolute transition-colors",style:{top:18,right:18,width:34,height:34,borderRadius:"50%",background:"rgba(255,255,255,0.08)",display:"flex",alignItems:"center",justifyContent:"center"},children:C.jsx(sx,{className:"w-4 h-4",style:{color:"#a9bbc4"}})}),C.jsxs("div",{className:"flex flex-col items-center mb-8",children:[C.jsx("div",{className:"relative grid place-items-center mb-4",style:{width:110,height:110,borderRadius:"50%",background:`linear-gradient(135deg, ${r.color}, ${r.accent})`,boxShadow:`0 0 40px ${r.ring}50`},children:C.jsxs("div",{className:"grid place-items-center",style:{width:86,height:86,borderRadius:"50%",background:"#0c1822"},children:[C.jsx("div",{style:{fontSize:22,marginBottom:4},children:r.icon}),C.jsx("div",{style:{color:r.ring,fontSize:16,fontWeight:800},children:r.abbr})]})}),C.jsx("div",{style:{color:"#f4f8fa",fontSize:24,fontWeight:700,letterSpacing:"-0.02em"},children:e.state}),C.jsx("div",{style:{color:r.ring,fontSize:14,fontWeight:700,marginTop:4},children:r.symbol}),C.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[C.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:"#65cec7",animation:"glow-pulse 2s ease-in-out infinite"}}),C.jsx("span",{style:{color:"#65cec7",fontSize:12},children:"Active on BTBX Blockchain"})]})]}),C.jsx("div",{className:"w-full mb-6",style:{height:1,background:`linear-gradient(90deg, transparent, ${r.ring}60, transparent)`}}),C.jsx("div",{className:"space-y-0",children:[{label:"Population Rank",value:`#${e.population_rank}`,color:"#eef6f7"},{label:"Total Real Estate Value",value:td(e.residential_value_b),color:"#65cec7"},{label:"Total Mortgage Debt",value:td(e.mortgage_debt_b),color:"#d68a6a"},{label:"Net Residential Equity",value:td(e.residential_equity_b),color:"#7fe0d6"},{label:"CHX Coins Issued (1:1)",value:i+" CHX",color:r.ring},{label:"Owner-Occupied Units",value:MN(e.owner_occupied_units),color:"#eef6f7"},{label:"Avg Property Value",value:ay(e.avg_value_per_unit),color:"#a9bbc4"},{label:"Avg Mortgage per Unit",value:ay(e.avg_mortgage_per_unit),color:"#d68a6a"},{label:"Avg Equity per Unit",value:ay(e.avg_equity_per_unit),color:"#7fe0d6"},{label:"Loan-to-Value Ratio",value:`${e.ltv_ratio}%`,color:"#d68a6a"},{label:"Equity Percentage",value:`${e.equity_percentage}%`,color:"#7fe0d6"},{label:"Annual Growth Trend",value:`+${e.growth_trend}%`,color:"#65cec7"}].map((o,s)=>C.jsxs("div",{className:"flex justify-between items-center py-2.5",style:{borderBottom:"1px solid rgba(165,203,211,0.1)"},children:[C.jsx("span",{style:{color:"#90a8b2",fontSize:13},children:o.label}),C.jsx("span",{style:{color:o.color,fontSize:14,fontWeight:700},children:o.value})]},s))}),C.jsxs("div",{className:"mt-6",children:[C.jsxs("div",{className:"flex justify-between mb-2",style:{fontSize:11,fontWeight:700,letterSpacing:"0.08em"},children:[C.jsxs("span",{style:{color:"#d68a6a"},children:["DEBT ",e.ltv_ratio,"%"]}),C.jsxs("span",{style:{color:"#7fe0d6"},children:["EQUITY ",e.equity_percentage,"%"]})]}),C.jsx("div",{style:{width:"100%",height:12,borderRadius:6,background:"rgba(255,255,255,0.06)",overflow:"hidden"},children:C.jsx("div",{style:{height:"100%",borderRadius:6,background:`linear-gradient(90deg, ${r.color}, ${r.accent})`,width:`${e.equity_percentage||0}%`,boxShadow:`0 0 10px ${r.ring}60`}})})]}),C.jsxs("button",{className:"mt-8 w-full transition-all duration-200",style:{padding:"15px",borderRadius:6,background:`linear-gradient(135deg, ${r.color}, ${r.accent})`,color:"#07181c",fontSize:12,fontWeight:750,letterSpacing:"0.1em",textTransform:"uppercase"},onMouseEnter:o=>o.currentTarget.style.filter="brightness(1.1)",onMouseLeave:o=>o.currentTarget.style.filter="brightness(1)",onClick:()=>{var o;t(),(o=document.getElementById("claim"))==null||o.scrollIntoView({behavior:"smooth"})},children:["Claim ",r.symbol," Coins →"]})]})]})}function q6({metrics:e}){const[t,r]=$.useState(null),[n,i]=$.useState(""),[o,s]=$.useState("equity"),u=e.filter(c=>c.state&&c.state.toLowerCase().includes(n.toLowerCase())).sort((c,d)=>o==="equity"?(d.residential_equity_b||0)-(c.residential_equity_b||0):o==="units"?(d.owner_occupied_units||0)-(c.owner_occupied_units||0):o==="growth"?(d.growth_trend||0)-(c.growth_trend||0):o==="rank"?(c.population_rank||99)-(d.population_rank||99):0);return C.jsxs("section",{id:"states",className:"relative",style:{padding:"92px 5%",background:"#10212d",borderBottom:"1px solid rgba(176,207,216,0.1)"},children:[C.jsxs("div",{className:"max-w-[1180px] mx-auto",children:[C.jsxs("div",{className:"mb-10",style:{maxWidth:680},children:[C.jsx("p",{style:{margin:"0 0 13px",color:"#48aaa5",fontSize:11,fontWeight:750,letterSpacing:"0.18em",textTransform:"uppercase"},children:"State Coins"}),C.jsx("h2",{style:{color:"#edf6f7",fontSize:40,lineHeight:1.08,letterSpacing:"-0.045em",fontWeight:700,margin:0},children:"Local property markets, connected."}),C.jsx("p",{style:{margin:"16px 0 0",color:"#90a8b2",lineHeight:1.7,fontSize:16},children:"State-level equity signals create a more precise view of the residential asset base."})]}),C.jsxs("div",{className:"flex flex-col md:flex-row gap-4 mb-10 justify-between items-stretch md:items-center",children:[C.jsx("input",{type:"text",placeholder:"Search states...",value:n,onChange:c=>i(c.target.value),className:"w-full md:w-72",style:{padding:"12px 16px",background:"rgba(12,24,34,0.6)",border:"1px solid rgba(165,203,211,0.18)",borderRadius:6,color:"#dce7ee",fontSize:14,outline:"none"},onFocus:c=>c.currentTarget.style.borderColor="rgba(90,202,194,0.55)",onBlur:c=>c.currentTarget.style.borderColor="rgba(165,203,211,0.18)"}),C.jsx("div",{className:"flex gap-2 flex-wrap justify-center",children:[{key:"equity",label:"By Equity"},{key:"units",label:"By Properties"},{key:"growth",label:"By Growth"},{key:"rank",label:"By Population"}].map(c=>C.jsx("button",{onClick:()=>s(c.key),className:"transition-all duration-200",style:{padding:"10px 16px",borderRadius:6,fontSize:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",background:o===c.key?"#2d9c98":"transparent",color:o===c.key?"#07181c":"#9fb2bc",border:`1px solid ${o===c.key?"#55c6bf":"rgba(92,206,197,0.3)"}`,cursor:"pointer"},children:c.label},c.key))})]}),C.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:u.map(c=>C.jsx(B6,{metric:c,onClick:r},c.id||c.state))}),u.length===0&&C.jsx("div",{className:"text-center py-20",style:{color:"#72939e",fontSize:15},children:"No states match your search."})]}),t&&C.jsx(F6,{metric:t,onClose:()=>r(null)})]})}var sy,WE;function Er(){if(WE)return sy;WE=1;var e=Array.isArray;return sy=e,sy}var ly,VE;function IN(){if(VE)return ly;VE=1;var e=typeof xf=="object"&&xf&&xf.Object===Object&&xf;return ly=e,ly}var uy,KE;function kn(){if(KE)return uy;KE=1;var e=IN(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return uy=r,uy}var cy,XE;function ec(){if(XE)return cy;XE=1;var e=kn(),t=e.Symbol;return cy=t,cy}var fy,GE;function U6(){if(GE)return fy;GE=1;var e=ec(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function o(s){var u=r.call(s,i),c=s[i];try{s[i]=void 0;var d=!0}catch{}var p=n.call(s);return d&&(u?s[i]=c:delete s[i]),p}return fy=o,fy}var dy,YE;function z6(){if(YE)return dy;YE=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return dy=r,dy}var hy,QE;function ri(){if(QE)return hy;QE=1;var e=ec(),t=U6(),r=z6(),n="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function s(u){return u==null?u===void 0?i:n:o&&o in Object(u)?t(u):r(u)}return hy=s,hy}var py,JE;function ni(){if(JE)return py;JE=1;function e(t){return t!=null&&typeof t=="object"}return py=e,py}var my,ZE;function js(){if(ZE)return my;ZE=1;var e=ri(),t=ni(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return my=n,my}var yy,eA;function Cx(){if(eA)return yy;eA=1;var e=Er(),t=js(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(o,s){if(e(o))return!1;var u=typeof o;return u=="number"||u=="symbol"||u=="boolean"||o==null||t(o)?!0:n.test(o)||!r.test(o)||s!=null&&o in Object(s)}return yy=i,yy}var gy,tA;function Yi(){if(tA)return gy;tA=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return gy=e,gy}var vy,rA;function kx(){if(rA)return vy;rA=1;var e=ri(),t=Yi(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function s(u){if(!t(u))return!1;var c=e(u);return c==n||c==i||c==r||c==o}return vy=s,vy}var by,nA;function H6(){if(nA)return by;nA=1;var e=kn(),t=e["__core-js_shared__"];return by=t,by}var wy,iA;function W6(){if(iA)return wy;iA=1;var e=H6(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return wy=r,wy}var xy,oA;function $N(){if(oA)return xy;oA=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return xy=r,xy}var _y,aA;function V6(){if(aA)return _y;aA=1;var e=kx(),t=W6(),r=Yi(),n=$N(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,c=s.toString,d=u.hasOwnProperty,p=RegExp("^"+c.call(d).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(y){if(!r(y)||t(y))return!1;var b=e(y)?p:o;return b.test(n(y))}return _y=h,_y}var Sy,sA;function K6(){if(sA)return Sy;sA=1;function e(t,r){return t==null?void 0:t[r]}return Sy=e,Sy}var Oy,lA;function ta(){if(lA)return Oy;lA=1;var e=V6(),t=K6();function r(n,i){var o=t(n,i);return e(o)?o:void 0}return Oy=r,Oy}var Ey,uA;function fh(){if(uA)return Ey;uA=1;var e=ta(),t=e(Object,"create");return Ey=t,Ey}var Ay,cA;function X6(){if(cA)return Ay;cA=1;var e=fh();function t(){this.__data__=e?e(null):{},this.size=0}return Ay=t,Ay}var Py,fA;function G6(){if(fA)return Py;fA=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return Py=e,Py}var Ty,dA;function Y6(){if(dA)return Ty;dA=1;var e=fh(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(o){var s=this.__data__;if(e){var u=s[o];return u===t?void 0:u}return n.call(s,o)?s[o]:void 0}return Ty=i,Ty}var Cy,hA;function Q6(){if(hA)return Cy;hA=1;var e=fh(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var o=this.__data__;return e?o[i]!==void 0:r.call(o,i)}return Cy=n,Cy}var ky,pA;function J6(){if(pA)return ky;pA=1;var e=fh(),t="__lodash_hash_undefined__";function r(n,i){var o=this.__data__;return this.size+=this.has(n)?0:1,o[n]=e&&i===void 0?t:i,this}return ky=r,ky}var jy,mA;function Z6(){if(mA)return jy;mA=1;var e=X6(),t=G6(),r=Y6(),n=Q6(),i=J6();function o(s){var u=-1,c=s==null?0:s.length;for(this.clear();++u-1}return Dy=t,Dy}var Ly,_A;function iU(){if(_A)return Ly;_A=1;var e=dh();function t(r,n){var i=this.__data__,o=e(i,r);return o<0?(++this.size,i.push([r,n])):i[o][1]=n,this}return Ly=t,Ly}var By,SA;function hh(){if(SA)return By;SA=1;var e=eU(),t=tU(),r=rU(),n=nU(),i=iU();function o(s){var u=-1,c=s==null?0:s.length;for(this.clear();++u0?1:-1},Po=function(t){return Ko(t)&&t.indexOf("%")===t.length-1},fe=function(t){return PU(t)&&!tc(t)},TU=function(t){return Ue(t)},Lt=function(t){return fe(t)||Ko(t)},CU=0,rc=function(t){var r=++CU;return"".concat(t||"").concat(r)},dr=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!fe(t)&&!Ko(t))return n;var o;if(Po(t)){var s=t.indexOf("%");o=r*parseFloat(t.slice(0,s))/100}else o=+t;return tc(o)&&(o=n),i&&o>r&&(o=r),o},Ma=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},kU=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function DU(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var QA={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Gn=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},JA=null,fg=null,Dx=function e(t){if(t===JA&&Array.isArray(fg))return fg;var r=[];return $.Children.forEach(t,function(n){Ue(n)||(SU.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),fg=r,JA=t,r};function Gr(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return Gn(i)}):n=[Gn(t)],Dx(e).forEach(function(i){var o=Nr(i,"type.displayName")||Nr(i,"type.name");n.indexOf(o)!==-1&&r.push(i)}),r}function jr(e,t){var r=Gr(e,t);return r&&r[0]}var ZA=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!fe(n)||n<=0||!fe(i)||i<=0)},LU=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],BU=function(t){return t&&t.type&&Ko(t.type)&&LU.indexOf(t.type)>=0},FU=function(t,r,n,i){var o,s=(o=cg==null?void 0:cg[i])!==null&&o!==void 0?o:[];return r.startsWith("data-")||!De(t)&&(i&&s.includes(r)||NU.includes(r))||n&&$x.includes(r)},$e=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if($.isValidElement(t)&&(i=t.props),!Rs(i))return null;var o={};return Object.keys(i).forEach(function(s){var u;FU((u=i)===null||u===void 0?void 0:u[s],s,r,n)&&(o[s]=i[s])}),o},Fb=function e(t,r){if(t===r)return!0;var n=$.Children.count(t);if(n!==$.Children.count(r))return!1;if(n===0)return!0;if(n===1)return eP(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function WU(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Ub(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,o=e.className,s=e.style,u=e.title,c=e.desc,d=HU(e,zU),p=i||{width:r,height:n,x:0,y:0},h=Be("recharts-surface",o);return H.createElement("svg",qb({},$e(d,!0,"svg"),{className:h,width:r,height:n,style:s,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height)}),H.createElement("title",null,u),H.createElement("desc",null,c),t)}var VU=["children","className"];function zb(){return zb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function XU(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var et=H.forwardRef(function(e,t){var r=e.children,n=e.className,i=KU(e,VU),o=Be("recharts-layer",n);return H.createElement("g",zb({className:o},$e(i,!0),{ref:t}),r)}),Yn=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;oo?0:o+r),n=n>o?o:n,n<0&&(n+=o),o=r>n?0:n-r>>>0,r>>>=0;for(var s=Array(o);++i=o?r:e(r,n,i)}return hg=t,hg}var pg,iP;function UN(){if(iP)return pg;iP=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,o="\\ufe0e\\ufe0f",s="\\u200d",u=RegExp("["+s+e+i+o+"]");function c(d){return u.test(d)}return pg=c,pg}var mg,oP;function QU(){if(oP)return mg;oP=1;function e(t){return t.split("")}return mg=e,mg}var yg,aP;function JU(){if(aP)return yg;aP=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,o="\\ufe0e\\ufe0f",s="["+e+"]",u="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",d="(?:"+u+"|"+c+")",p="[^"+e+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",y="[\\ud800-\\udbff][\\udc00-\\udfff]",b="\\u200d",S=d+"?",w="["+o+"]?",v="(?:"+b+"(?:"+[p,h,y].join("|")+")"+w+S+")*",x=w+S+v,O="(?:"+[p+u+"?",u,h,y,s].join("|")+")",A=RegExp(c+"(?="+c+")|"+O+x,"g");function P(E){return E.match(A)||[]}return yg=P,yg}var gg,sP;function ZU(){if(sP)return gg;sP=1;var e=QU(),t=UN(),r=JU();function n(i){return t(i)?r(i):e(i)}return gg=n,gg}var vg,lP;function ez(){if(lP)return vg;lP=1;var e=YU(),t=UN(),r=ZU(),n=LN();function i(o){return function(s){s=n(s);var u=t(s)?r(s):void 0,c=u?u[0]:s.charAt(0),d=u?e(u,1).join(""):s.slice(1);return c[o]()+d}}return vg=i,vg}var bg,uP;function tz(){if(uP)return bg;uP=1;var e=ez(),t=e("toUpperCase");return bg=t,bg}var rz=tz();const yh=tt(rz);function ct(e){return function(){return e}}const zN=Math.cos,cd=Math.sin,pn=Math.sqrt,fd=Math.PI,gh=2*fd,Hb=Math.PI,Wb=2*Hb,xo=1e-6,nz=Wb-xo;function HN(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return HN;const r=10**t;return function(n){this._+=n[0];for(let i=1,o=n.length;ixo)if(!(Math.abs(h*c-d*p)>xo)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let b=n-s,S=i-u,w=c*c+d*d,v=b*b+S*S,x=Math.sqrt(w),O=Math.sqrt(y),A=o*Math.tan((Hb-Math.acos((w+y-v)/(2*x*O)))/2),P=A/O,E=A/x;Math.abs(P-1)>xo&&this._append`L${t+P*p},${r+P*h}`,this._append`A${o},${o},0,0,${+(h*b>p*S)},${this._x1=t+E*c},${this._y1=r+E*d}`}}arc(t,r,n,i,o,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(i),c=n*Math.sin(i),d=t+u,p=r+c,h=1^s,y=s?i-o:o-i;this._x1===null?this._append`M${d},${p}`:(Math.abs(this._x1-d)>xo||Math.abs(this._y1-p)>xo)&&this._append`L${d},${p}`,n&&(y<0&&(y=y%Wb+Wb),y>nz?this._append`A${n},${n},0,1,${h},${t-u},${r-c}A${n},${n},0,1,${h},${this._x1=d},${this._y1=p}`:y>xo&&this._append`A${n},${n},0,${+(y>=Hb)},${h},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Lx(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new oz(t)}function Bx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function WN(e){this._context=e}WN.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function vh(e){return new WN(e)}function VN(e){return e[0]}function KN(e){return e[1]}function XN(e,t){var r=ct(!0),n=null,i=vh,o=null,s=Lx(u);e=typeof e=="function"?e:e===void 0?VN:ct(e),t=typeof t=="function"?t:t===void 0?KN:ct(t);function u(c){var d,p=(c=Bx(c)).length,h,y=!1,b;for(n==null&&(o=i(b=s())),d=0;d<=p;++d)!(d=b;--S)u.point(A[S],P[S]);u.lineEnd(),u.areaEnd()}x&&(A[y]=+e(v,y,h),P[y]=+t(v,y,h),u.point(n?+n(v,y,h):A[y],r?+r(v,y,h):P[y]))}if(O)return u=null,O+""||null}function p(){return XN().defined(i).curve(s).context(o)}return d.x=function(h){return arguments.length?(e=typeof h=="function"?h:ct(+h),n=null,d):e},d.x0=function(h){return arguments.length?(e=typeof h=="function"?h:ct(+h),d):e},d.x1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:ct(+h),d):n},d.y=function(h){return arguments.length?(t=typeof h=="function"?h:ct(+h),r=null,d):t},d.y0=function(h){return arguments.length?(t=typeof h=="function"?h:ct(+h),d):t},d.y1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:ct(+h),d):r},d.lineX0=d.lineY0=function(){return p().x(e).y(t)},d.lineY1=function(){return p().x(e).y(r)},d.lineX1=function(){return p().x(n).y(t)},d.defined=function(h){return arguments.length?(i=typeof h=="function"?h:ct(!!h),d):i},d.curve=function(h){return arguments.length?(s=h,o!=null&&(u=s(o)),d):s},d.context=function(h){return arguments.length?(h==null?o=u=null:u=s(o=h),d):o},d}class GN{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function az(e){return new GN(e,!0)}function sz(e){return new GN(e,!1)}const Fx={draw(e,t){const r=pn(t/fd);e.moveTo(r,0),e.arc(0,0,r,0,gh)}},lz={draw(e,t){const r=pn(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},YN=pn(1/3),uz=YN*2,cz={draw(e,t){const r=pn(t/uz),n=r*YN;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},fz={draw(e,t){const r=pn(t),n=-r/2;e.rect(n,n,r,r)}},dz=.8908130915292852,QN=cd(fd/10)/cd(7*fd/10),hz=cd(gh/10)*QN,pz=-zN(gh/10)*QN,mz={draw(e,t){const r=pn(t*dz),n=hz*r,i=pz*r;e.moveTo(0,-r),e.lineTo(n,i);for(let o=1;o<5;++o){const s=gh*o/5,u=zN(s),c=cd(s);e.lineTo(c*r,-u*r),e.lineTo(u*n-c*i,c*n+u*i)}e.closePath()}},wg=pn(3),yz={draw(e,t){const r=-pn(t/(wg*3));e.moveTo(0,r*2),e.lineTo(-wg*r,-r),e.lineTo(wg*r,-r),e.closePath()}},Fr=-.5,qr=pn(3)/2,Vb=1/pn(12),gz=(Vb/2+1)*3,vz={draw(e,t){const r=pn(t/gz),n=r/2,i=r*Vb,o=n,s=r*Vb+r,u=-o,c=s;e.moveTo(n,i),e.lineTo(o,s),e.lineTo(u,c),e.lineTo(Fr*n-qr*i,qr*n+Fr*i),e.lineTo(Fr*o-qr*s,qr*o+Fr*s),e.lineTo(Fr*u-qr*c,qr*u+Fr*c),e.lineTo(Fr*n+qr*i,Fr*i-qr*n),e.lineTo(Fr*o+qr*s,Fr*s-qr*o),e.lineTo(Fr*u+qr*c,Fr*c-qr*u),e.closePath()}};function bz(e,t){let r=null,n=Lx(i);e=typeof e=="function"?e:ct(e||Fx),t=typeof t=="function"?t:ct(t===void 0?64:+t);function i(){let o;if(r||(r=o=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),o)return r=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:ct(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:ct(+o),i):t},i.context=function(o){return arguments.length?(r=o??null,i):r},i}function dd(){}function hd(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function JN(e){this._context=e}JN.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:hd(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:hd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wz(e){return new JN(e)}function ZN(e){this._context=e}ZN.prototype={areaStart:dd,areaEnd:dd,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:hd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function xz(e){return new ZN(e)}function eM(e){this._context=e}eM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:hd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _z(e){return new eM(e)}function tM(e){this._context=e}tM.prototype={areaStart:dd,areaEnd:dd,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Sz(e){return new tM(e)}function cP(e){return e<0?-1:1}function fP(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),s=(r-e._y1)/(i||n<0&&-0),u=(o*i+s*n)/(n+i);return(cP(o)+cP(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(u))||0}function dP(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function xg(e,t,r){var n=e._x0,i=e._y0,o=e._x1,s=e._y1,u=(o-n)/3;e._context.bezierCurveTo(n+u,i+u*t,o-u,s-u*r,o,s)}function pd(e){this._context=e}pd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:xg(this,this._t0,dP(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,xg(this,dP(this,r=fP(this,e,t)),r);break;default:xg(this,this._t0,r=fP(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function rM(e){this._context=new nM(e)}(rM.prototype=Object.create(pd.prototype)).point=function(e,t){pd.prototype.point.call(this,t,e)};function nM(e){this._context=e}nM.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}};function Oz(e){return new pd(e)}function Ez(e){return new rM(e)}function iM(e){this._context=e}iM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=hP(e),i=hP(t),o=0,s=1;s=0;--t)i[t]=(s[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Pz(e){return new bh(e,.5)}function Tz(e){return new bh(e,0)}function Cz(e){return new bh(e,1)}function rs(e,t){if((s=e.length)>1)for(var r=1,n,i,o=e[t[0]],s,u=o.length;r=0;)r[t]=t;return r}function kz(e,t){return e[t]}function jz(e){const t=[];return t.key=e,t}function Rz(){var e=ct([]),t=Kb,r=rs,n=kz;function i(o){var s=Array.from(e.apply(this,arguments),jz),u,c=s.length,d=-1,p;for(const h of o)for(u=0,++d;u0){for(var r,n,i=0,o=e[0].length,s;i0){for(var r=0,n=e[t[0]],i,o=n.length;r0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,s;n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function qz(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var oM={symbolCircle:Fx,symbolCross:lz,symbolDiamond:cz,symbolSquare:fz,symbolStar:mz,symbolTriangle:yz,symbolWye:vz},Uz=Math.PI/180,zz=function(t){var r="symbol".concat(yh(t));return oM[r]||Fx},Hz=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*Uz;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},Wz=function(t,r){oM["symbol".concat(yh(t))]=r},qx=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,o=i===void 0?64:i,s=t.sizeType,u=s===void 0?"area":s,c=Fz(t,$z),d=mP(mP({},c),{},{type:n,size:o,sizeType:u}),p=function(){var v=zz(n),x=bz().type(v).size(Hz(o,u,n));return x()},h=d.className,y=d.cx,b=d.cy,S=$e(d,!0);return y===+y&&b===+b&&o===+o?H.createElement("path",Xb({},S,{className:Be("recharts-symbols",h),transform:"translate(".concat(y,", ").concat(b,")"),d:p()})):null};qx.registerSymbol=Wz;function ns(e){"@babel/helpers - typeof";return ns=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ns(e)}function Gb(){return Gb=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var O=b.inactive?d:b.color;return H.createElement("li",Gb({className:v,style:h,key:"legend-item-".concat(S)},Xo(n.props,b,S)),H.createElement(Ub,{width:s,height:s,viewBox:p,style:y},n.renderIcon(b)),H.createElement("span",{className:"recharts-legend-item-text",style:{color:O}},w?w(x,b,S):x))})}},{key:"render",value:function(){var n=this.props,i=n.payload,o=n.layout,s=n.align;if(!i||!i.length)return null;var u={padding:0,margin:0,textAlign:o==="horizontal"?s:"left"};return H.createElement("ul",{className:"recharts-default-legend",style:u},this.renderItems())}}])})($.PureComponent);su(Ux,"displayName","Legend");su(Ux,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var _g,gP;function t7(){if(gP)return _g;gP=1;var e=hh();function t(){this.__data__=new e,this.size=0}return _g=t,_g}var Sg,vP;function r7(){if(vP)return Sg;vP=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return Sg=e,Sg}var Og,bP;function n7(){if(bP)return Og;bP=1;function e(t){return this.__data__.get(t)}return Og=e,Og}var Eg,wP;function i7(){if(wP)return Eg;wP=1;function e(t){return this.__data__.has(t)}return Eg=e,Eg}var Ag,xP;function o7(){if(xP)return Ag;xP=1;var e=hh(),t=Rx(),r=Nx(),n=200;function i(o,s){var u=this.__data__;if(u instanceof e){var c=u.__data__;if(!t||c.lengthb))return!1;var w=h.get(s),v=h.get(u);if(w&&v)return w==u&&v==s;var x=-1,O=!0,A=c&i?new e:void 0;for(h.set(s,u),h.set(u,s);++x-1&&n%1==0&&n-1&&r%1==0&&r<=e}return Xg=t,Xg}var Gg,WP;function v7(){if(WP)return Gg;WP=1;var e=ri(),t=Vx(),r=ni(),n="[object Arguments]",i="[object Array]",o="[object Boolean]",s="[object Date]",u="[object Error]",c="[object Function]",d="[object Map]",p="[object Number]",h="[object Object]",y="[object RegExp]",b="[object Set]",S="[object String]",w="[object WeakMap]",v="[object ArrayBuffer]",x="[object DataView]",O="[object Float32Array]",A="[object Float64Array]",P="[object Int8Array]",E="[object Int16Array]",T="[object Int32Array]",j="[object Uint8Array]",R="[object Uint8ClampedArray]",N="[object Uint16Array]",V="[object Uint32Array]",q={};q[O]=q[A]=q[P]=q[E]=q[T]=q[j]=q[R]=q[N]=q[V]=!0,q[n]=q[i]=q[v]=q[o]=q[x]=q[s]=q[u]=q[c]=q[d]=q[p]=q[h]=q[y]=q[b]=q[S]=q[w]=!1;function L(K){return r(K)&&t(K.length)&&!!q[e(K)]}return Gg=L,Gg}var Yg,VP;function mM(){if(VP)return Yg;VP=1;function e(t){return function(r){return t(r)}}return Yg=e,Yg}var Hl={exports:{}};Hl.exports;var KP;function b7(){return KP||(KP=1,(function(e,t){var r=IN(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,s=o&&r.process,u=(function(){try{var c=i&&i.require&&i.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}})();e.exports=u})(Hl,Hl.exports)),Hl.exports}var Qg,XP;function yM(){if(XP)return Qg;XP=1;var e=v7(),t=mM(),r=b7(),n=r&&r.isTypedArray,i=n?t(n):e;return Qg=i,Qg}var Jg,GP;function w7(){if(GP)return Jg;GP=1;var e=m7(),t=Hx(),r=Er(),n=pM(),i=Wx(),o=yM(),s=Object.prototype,u=s.hasOwnProperty;function c(d,p){var h=r(d),y=!h&&t(d),b=!h&&!y&&n(d),S=!h&&!y&&!b&&o(d),w=h||y||b||S,v=w?e(d.length,String):[],x=v.length;for(var O in d)(p||u.call(d,O))&&!(w&&(O=="length"||b&&(O=="offset"||O=="parent")||S&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||i(O,x)))&&v.push(O);return v}return Jg=c,Jg}var Zg,YP;function x7(){if(YP)return Zg;YP=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return Zg=t,Zg}var ev,QP;function gM(){if(QP)return ev;QP=1;function e(t,r){return function(n){return t(r(n))}}return ev=e,ev}var tv,JP;function _7(){if(JP)return tv;JP=1;var e=gM(),t=e(Object.keys,Object);return tv=t,tv}var rv,ZP;function S7(){if(ZP)return rv;ZP=1;var e=x7(),t=_7(),r=Object.prototype,n=r.hasOwnProperty;function i(o){if(!e(o))return t(o);var s=[];for(var u in Object(o))n.call(o,u)&&u!="constructor"&&s.push(u);return s}return rv=i,rv}var nv,eT;function nc(){if(eT)return nv;eT=1;var e=kx(),t=Vx();function r(n){return n!=null&&t(n.length)&&!e(n)}return nv=r,nv}var iv,tT;function wh(){if(tT)return iv;tT=1;var e=w7(),t=S7(),r=nc();function n(i){return r(i)?e(i):t(i)}return iv=n,iv}var ov,rT;function O7(){if(rT)return ov;rT=1;var e=f7(),t=p7(),r=wh();function n(i){return e(i,r,t)}return ov=n,ov}var av,nT;function E7(){if(nT)return av;nT=1;var e=O7(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(o,s,u,c,d,p){var h=u&t,y=e(o),b=y.length,S=e(s),w=S.length;if(b!=w&&!h)return!1;for(var v=b;v--;){var x=y[v];if(!(h?x in s:n.call(s,x)))return!1}var O=p.get(o),A=p.get(s);if(O&&A)return O==s&&A==o;var P=!0;p.set(o,s),p.set(s,o);for(var E=h;++v-1}return Rv=t,Rv}var Nv,kT;function W7(){if(kT)return Nv;kT=1;function e(t,r,n){for(var i=-1,o=t==null?0:t.length;++i=s){var x=d?null:i(c);if(x)return o(x);S=!1,y=n,v=new e}else v=d?[]:w;e:for(;++h=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function aH(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function sH(e){return e.value}function lH(e,t){if(H.isValidElement(e))return H.cloneElement(e,t);if(typeof e=="function")return H.createElement(e,t);t.ref;var r=oH(t,Q7);return H.createElement(Ux,r)}var LT=1,qa=(function(e){function t(){var r;J7(this,t);for(var n=arguments.length,i=new Array(n),o=0;oLT||Math.abs(i.height-this.lastBoundingBox.height)>LT)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?qn({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,o=i.layout,s=i.align,u=i.verticalAlign,c=i.margin,d=i.chartWidth,p=i.chartHeight,h,y;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(s==="center"&&o==="vertical"){var b=this.getBBoxSnapshot();h={left:((d||0)-b.width)/2}}else h=s==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(u==="middle"){var S=this.getBBoxSnapshot();y={top:((p||0)-S.height)/2}}else y=u==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return qn(qn({},h),y)}},{key:"render",value:function(){var n=this,i=this.props,o=i.content,s=i.width,u=i.height,c=i.wrapperStyle,d=i.payloadUniqBy,p=i.payload,h=qn(qn({position:"absolute",width:s||"auto",height:u||"auto"},this.getDefaultPosition(c)),c);return H.createElement("div",{className:"recharts-legend-wrapper",style:h,ref:function(b){n.wrapperNode=b}},lH(o,qn(qn({},this.props),{},{payload:_M(p,d,sH)})))}}],[{key:"getWithHeight",value:function(n,i){var o=qn(qn({},this.defaultProps),n.props),s=o.layout;return s==="vertical"&&fe(n.props.height)?{height:n.props.height}:s==="horizontal"?{width:n.props.width||i}:null}}])})($.PureComponent);xh(qa,"displayName","Legend");xh(qa,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Lv,BT;function uH(){if(BT)return Lv;BT=1;var e=ec(),t=Hx(),r=Er(),n=e?e.isConcatSpreadable:void 0;function i(o){return r(o)||t(o)||!!(n&&o&&o[n])}return Lv=i,Lv}var Bv,FT;function EM(){if(FT)return Bv;FT=1;var e=hM(),t=uH();function r(n,i,o,s,u){var c=-1,d=n.length;for(o||(o=t),u||(u=[]);++c0&&o(p)?i>1?r(p,i-1,o,s,u):e(u,p):s||(u[u.length]=p)}return u}return Bv=r,Bv}var Fv,qT;function cH(){if(qT)return Fv;qT=1;function e(t){return function(r,n,i){for(var o=-1,s=Object(r),u=i(r),c=u.length;c--;){var d=u[t?c:++o];if(n(s[d],d,s)===!1)break}return r}}return Fv=e,Fv}var qv,UT;function fH(){if(UT)return qv;UT=1;var e=cH(),t=e();return qv=t,qv}var Uv,zT;function AM(){if(zT)return Uv;zT=1;var e=fH(),t=wh();function r(n,i){return n&&e(n,i,t)}return Uv=r,Uv}var zv,HT;function dH(){if(HT)return zv;HT=1;var e=nc();function t(r,n){return function(i,o){if(i==null)return i;if(!e(i))return r(i,o);for(var s=i.length,u=n?s:-1,c=Object(i);(n?u--:++un||u&&c&&p&&!d&&!h||o&&c&&p||!i&&p||!s)return 1;if(!o&&!u&&!h&&r=d)return p;var h=i[o];return p*(h=="desc"?-1:1)}}return r.index-n.index}return Xv=t,Xv}var Gv,YT;function yH(){if(YT)return Gv;YT=1;var e=Mx(),t=Ix(),r=jn(),n=PM(),i=hH(),o=mM(),s=mH(),u=Ns(),c=Er();function d(p,h,y){h.length?h=e(h,function(w){return c(w)?function(v){return t(v,w.length===1?w[0]:w)}:w}):h=[u];var b=-1;h=e(h,o(r));var S=n(p,function(w,v,x){var O=e(h,function(A){return A(w)});return{criteria:O,index:++b,value:w}});return i(S,function(w,v){return s(w,v,y)})}return Gv=d,Gv}var Yv,QT;function gH(){if(QT)return Yv;QT=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return Yv=e,Yv}var Qv,JT;function vH(){if(JT)return Qv;JT=1;var e=gH(),t=Math.max;function r(n,i,o){return i=t(i===void 0?n.length-1:i,0),function(){for(var s=arguments,u=-1,c=t(s.length-i,0),d=Array(c);++u0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return t0=n,t0}var r0,nC;function _H(){if(nC)return r0;nC=1;var e=wH(),t=xH(),r=t(e);return r0=r,r0}var n0,iC;function SH(){if(iC)return n0;iC=1;var e=Ns(),t=vH(),r=_H();function n(i,o){return r(t(i,o,e),i+"")}return n0=n,n0}var i0,oC;function _h(){if(oC)return i0;oC=1;var e=jx(),t=nc(),r=Wx(),n=Yi();function i(o,s,u){if(!n(u))return!1;var c=typeof s;return(c=="number"?t(u)&&r(s,u.length):c=="string"&&s in u)?e(u[s],o):!1}return i0=i,i0}var o0,aC;function OH(){if(aC)return o0;aC=1;var e=EM(),t=yH(),r=SH(),n=_h(),i=r(function(o,s){if(o==null)return[];var u=s.length;return u>1&&n(o,s[0],s[1])?s=[]:u>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),t(o,e(s,1),[])});return o0=i,o0}var EH=OH();const Gx=tt(EH);function lu(e){"@babel/helpers - typeof";return lu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lu(e)}function Jb(){return Jb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t.x),"".concat(kl,"-left"),fe(r)&&t&&fe(t.x)&&r=t.y),"".concat(kl,"-top"),fe(n)&&t&&fe(t.y)&&nw?Math.max(p,c[n]):Math.max(h,c[n])}function FH(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function qH(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,o=e.reverseDirection,s=e.tooltipBox,u=e.useTranslate3d,c=e.viewBox,d,p,h;return s.height>0&&s.width>0&&r?(p=uC({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:o,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),h=uC({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:o,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),d=FH({translateX:p,translateY:h,useTranslate3d:u})):d=LH,{cssProperties:d,cssClasses:BH({translateX:p,translateY:h,coordinate:r})}}function os(e){"@babel/helpers - typeof";return os=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},os(e)}function cC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fC(e){for(var t=1;tdC||Math.abs(n.height-this.state.lastBoundingBox.height)>dC)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,o=i.active,s=i.allowEscapeViewBox,u=i.animationDuration,c=i.animationEasing,d=i.children,p=i.coordinate,h=i.hasPayload,y=i.isAnimationActive,b=i.offset,S=i.position,w=i.reverseDirection,v=i.useTranslate3d,x=i.viewBox,O=i.wrapperStyle,A=qH({allowEscapeViewBox:s,coordinate:p,offsetTopLeft:b,position:S,reverseDirection:w,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:x}),P=A.cssClasses,E=A.cssProperties,T=fC(fC({transition:y&&o?"transform ".concat(u,"ms ").concat(c):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&h?"visible":"hidden",position:"absolute",top:0,left:0},O);return H.createElement("div",{tabIndex:-1,className:P,style:T,ref:function(R){n.wrapperNode=R}},d)}}])})($.PureComponent),QH=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ms={isSsr:QH()};function as(e){"@babel/helpers - typeof";return as=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},as(e)}function hC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pC(e){for(var t=1;t0;return H.createElement(YH,{allowEscapeViewBox:s,animationDuration:u,animationEasing:c,isAnimationActive:y,active:o,coordinate:p,hasPayload:T,offset:b,position:v,reverseDirection:x,useTranslate3d:O,viewBox:A,wrapperStyle:P},sW(d,pC(pC({},this.props),{},{payload:E})))}}])})($.PureComponent);Yx(Wr,"displayName","Tooltip");Yx(Wr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ms.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var s0,mC;function lW(){if(mC)return s0;mC=1;var e=kn(),t=function(){return e.Date.now()};return s0=t,s0}var l0,yC;function uW(){if(yC)return l0;yC=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return l0=t,l0}var u0,gC;function cW(){if(gC)return u0;gC=1;var e=uW(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return u0=r,u0}var c0,vC;function NM(){if(vC)return c0;vC=1;var e=cW(),t=Yi(),r=js(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt;function c(d){if(typeof d=="number")return d;if(r(d))return n;if(t(d)){var p=typeof d.valueOf=="function"?d.valueOf():d;d=t(p)?p+"":p}if(typeof d!="string")return d===0?d:+d;d=e(d);var h=o.test(d);return h||s.test(d)?u(d.slice(2),h?2:8):i.test(d)?n:+d}return c0=c,c0}var f0,bC;function fW(){if(bC)return f0;bC=1;var e=Yi(),t=lW(),r=NM(),n="Expected a function",i=Math.max,o=Math.min;function s(u,c,d){var p,h,y,b,S,w,v=0,x=!1,O=!1,A=!0;if(typeof u!="function")throw new TypeError(n);c=r(c)||0,e(d)&&(x=!!d.leading,O="maxWait"in d,y=O?i(r(d.maxWait)||0,c):y,A="trailing"in d?!!d.trailing:A);function P(K){var Y=p,Q=h;return p=h=void 0,v=K,b=u.apply(Q,Y),b}function E(K){return v=K,S=setTimeout(R,c),x?P(K):b}function T(K){var Y=K-w,Q=K-v,Z=c-Y;return O?o(Z,y-Q):Z}function j(K){var Y=K-w,Q=K-v;return w===void 0||Y>=c||Y<0||O&&Q>=y}function R(){var K=t();if(j(K))return N(K);S=setTimeout(R,T(K))}function N(K){return S=void 0,A&&p?P(K):(p=h=void 0,b)}function V(){S!==void 0&&clearTimeout(S),v=0,p=w=h=S=void 0}function q(){return S===void 0?b:N(t())}function L(){var K=t(),Y=j(K);if(p=arguments,h=this,w=K,Y){if(S===void 0)return E(w);if(O)return clearTimeout(S),S=setTimeout(R,c),P(w)}return S===void 0&&(S=setTimeout(R,c)),b}return L.cancel=V,L.flush=q,L}return f0=s,f0}var d0,wC;function dW(){if(wC)return d0;wC=1;var e=fW(),t=Yi(),r="Expected a function";function n(i,o,s){var u=!0,c=!0;if(typeof i!="function")throw new TypeError(r);return t(s)&&(u="leading"in s?!!s.leading:u,c="trailing"in s?!!s.trailing:c),e(i,o,{leading:u,maxWait:o,trailing:c})}return d0=n,d0}var hW=dW();const MM=tt(hW);function cu(e){"@babel/helpers - typeof";return cu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cu(e)}function xC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rf(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(K=MM(K,w,{trailing:!0,leading:!1}));var Y=new ResizeObserver(K),Q=E.current.getBoundingClientRect(),Z=Q.width,te=Q.height;return q(Z,te),Y.observe(E.current),function(){Y.disconnect()}},[q,w]);var L=$.useMemo(function(){var K=N.containerWidth,Y=N.containerHeight;if(K<0||Y<0)return null;Yn(Po(s)||Po(c),`The width(%s) and height(%s) are both fixed numbers, maybe you don't need to use a ResponsiveContainer.`,s,c),Yn(!r||r>0,"The aspect(%s) must be greater than zero.",r);var Q=Po(s)?K:s,Z=Po(c)?Y:c;r&&r>0&&(Q?Z=Q/r:Z&&(Q=Z*r),y&&Z>y&&(Z=y)),Yn(Q>0||Z>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the height and width.`,Q,Z,s,c,p,h,r);var te=!Array.isArray(b)&&Gn(b.type).endsWith("Chart");return H.Children.map(b,function(G){return H.isValidElement(G)?$.cloneElement(G,Rf({width:Q,height:Z},te?{style:Rf({height:"100%",width:"100%",maxHeight:Z,maxWidth:Q},G.props.style)}:{})):G})},[r,b,c,y,h,p,N,s]);return H.createElement("div",{id:v?"".concat(v):void 0,className:Be("recharts-responsive-container",x),style:Rf(Rf({},P),{},{width:s,height:c,minWidth:p,minHeight:h,maxHeight:y}),ref:E},L)}),ic=function(t){return null};ic.displayName="Cell";function fu(e){"@babel/helpers - typeof";return fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fu(e)}function SC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nw(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ms.isSsr)return{width:0,height:0};var n=PW(r),i=JSON.stringify({text:t,copyStyle:n});if(ja.widthCache[i])return ja.widthCache[i];try{var o=document.getElementById(OC);o||(o=document.createElement("span"),o.setAttribute("id",OC),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var s=nw(nw({},AW),n);Object.assign(o.style,s),o.textContent="".concat(t);var u=o.getBoundingClientRect(),c={width:u.width,height:u.height};return ja.widthCache[i]=c,++ja.cacheCount>EW&&(ja.cacheCount=0,ja.widthCache={}),c}catch{return{width:0,height:0}}},TW=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function du(e){"@babel/helpers - typeof";return du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},du(e)}function bd(e,t){return RW(e)||jW(e,t)||kW(e,t)||CW()}function CW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kW(e,t){if(e){if(typeof e=="string")return EC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return EC(e,t)}}function EC(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function VW(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function jC(e,t){return YW(e)||GW(e,t)||XW(e,t)||KW()}function KW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XW(e,t){if(e){if(typeof e=="string")return RC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return RC(e,t)}}function RC(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[];return Q.reduce(function(Z,te){var G=te.word,re=te.width,W=Z[Z.length-1];if(W&&(i==null||o||W.width+re+nte.width?Z:te})};if(!p)return b;for(var w="…",v=function(Q){var Z=h.slice(0,Q),te=LM({breakAll:d,style:c,children:Z+w}).wordsWithComputedWidth,G=y(te),re=G.length>s||S(G).width>Number(i);return[re,G]},x=0,O=h.length-1,A=0,P;x<=O&&A<=h.length-1;){var E=Math.floor((x+O)/2),T=E-1,j=v(T),R=jC(j,2),N=R[0],V=R[1],q=v(E),L=jC(q,1),K=L[0];if(!N&&!K&&(x=E+1),N&&K&&(O=E-1),!N&&K){P=V;break}A++}return P||b},NC=function(t){var r=Ue(t)?[]:t.toString().split(DM);return[{words:r}]},JW=function(t){var r=t.width,n=t.scaleToFit,i=t.children,o=t.style,s=t.breakAll,u=t.maxLines;if((r||n)&&!Ms.isSsr){var c,d,p=LM({breakAll:s,children:i,style:o});if(p){var h=p.wordsWithComputedWidth,y=p.spaceWidth;c=h,d=y}else return NC(i);return QW({breakAll:s,children:i,maxLines:u,style:o},c,d,r,n)}return NC(i)},MC="#808080",Go=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,o=i===void 0?0:i,s=t.lineHeight,u=s===void 0?"1em":s,c=t.capHeight,d=c===void 0?"0.71em":c,p=t.scaleToFit,h=p===void 0?!1:p,y=t.textAnchor,b=y===void 0?"start":y,S=t.verticalAnchor,w=S===void 0?"end":S,v=t.fill,x=v===void 0?MC:v,O=kC(t,HW),A=$.useMemo(function(){return JW({breakAll:O.breakAll,children:O.children,maxLines:O.maxLines,scaleToFit:h,style:O.style,width:O.width})},[O.breakAll,O.children,O.maxLines,h,O.style,O.width]),P=O.dx,E=O.dy,T=O.angle,j=O.className,R=O.breakAll,N=kC(O,WW);if(!Lt(n)||!Lt(o))return null;var V=n+(fe(P)?P:0),q=o+(fe(E)?E:0),L;switch(w){case"start":L=h0("calc(".concat(d,")"));break;case"middle":L=h0("calc(".concat((A.length-1)/2," * -").concat(u," + (").concat(d," / 2))"));break;default:L=h0("calc(".concat(A.length-1," * -").concat(u,")"));break}var K=[];if(h){var Y=A[0].width,Q=O.width;K.push("scale(".concat((fe(Q)?Q/Y:1)/Y,")"))}return T&&K.push("rotate(".concat(T,", ").concat(V,", ").concat(q,")")),K.length&&(N.transform=K.join(" ")),H.createElement("text",iw({},$e(N,!0),{x:V,y:q,className:Be("recharts-text",j),textAnchor:b,fill:x.includes("url")?MC:x}),A.map(function(Z,te){var G=Z.words.join(R?"":" ");return H.createElement("tspan",{x:V,dy:te===0?L:u,key:"".concat(G,"-").concat(te)},G)}))};function Wi(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function ZW(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Qx(e){let t,r,n;e.length!==2?(t=Wi,r=(u,c)=>Wi(e(u),c),n=(u,c)=>e(u)-c):(t=e===Wi||e===ZW?e:e9,r=e,n=e);function i(u,c,d=0,p=u.length){if(d>>1;r(u[h],c)<0?d=h+1:p=h}while(d>>1;r(u[h],c)<=0?d=h+1:p=h}while(dd&&n(u[h-1],c)>-n(u[h],c)?h-1:h}return{left:i,center:s,right:o}}function e9(){return 0}function BM(e){return e===null?NaN:+e}function*t9(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const r9=Qx(Wi),oc=r9.right;Qx(BM).center;class IC extends Map{constructor(t,r=o9){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get($C(this,t))}has(t){return super.has($C(this,t))}set(t,r){return super.set(n9(this,t),r)}delete(t){return super.delete(i9(this,t))}}function $C({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function n9({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function i9({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function o9(e){return e!==null&&typeof e=="object"?e.valueOf():e}function a9(e=Wi){if(e===Wi)return FM;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function FM(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const s9=Math.sqrt(50),l9=Math.sqrt(10),u9=Math.sqrt(2);function wd(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),s=o>=s9?10:o>=l9?5:o>=u9?2:1;let u,c,d;return i<0?(d=Math.pow(10,-i)/s,u=Math.round(e*d),c=Math.round(t*d),u/dt&&--c,d=-d):(d=Math.pow(10,i)*s,u=Math.round(e/d),c=Math.round(t/d),u*dt&&--c),c0))return[];if(e===t)return[e];const n=t=i))return[];const u=o-i+1,c=new Array(u);if(n)if(s<0)for(let d=0;d=n)&&(r=n);return r}function LC(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function qM(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?FM:a9(i);n>r;){if(n-r>600){const c=n-r+1,d=t-r+1,p=Math.log(c),h=.5*Math.exp(2*p/3),y=.5*Math.sqrt(p*h*(c-h)/c)*(d-c/2<0?-1:1),b=Math.max(r,Math.floor(t-d*h/c+y)),S=Math.min(n,Math.floor(t+(c-d)*h/c+y));qM(e,t,b,S,i)}const o=e[t];let s=r,u=n;for(jl(e,r,t),i(e[n],o)>0&&jl(e,r,n);s0;)--u}i(e[r],o)===0?jl(e,r,u):(++u,jl(e,u,n)),u<=t&&(r=u+1),t<=u&&(n=u-1)}return e}function jl(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function c9(e,t,r){if(e=Float64Array.from(t9(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return LC(e);if(t>=1)return DC(e);var n,i=(n-1)*t,o=Math.floor(i),s=DC(qM(e,o).subarray(0,o+1)),u=LC(e.subarray(o+1));return s+(u-s)*(i-o)}}function f9(e,t,r=BM){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),s=+r(e[o],o,e),u=+r(e[o+1],o+1,e);return s+(u-s)*(i-o)}}function d9(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Mf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Mf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=p9.exec(e))?new Sr(t[1],t[2],t[3],1):(t=m9.exec(e))?new Sr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=y9.exec(e))?Mf(t[1],t[2],t[3],t[4]):(t=g9.exec(e))?Mf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=v9.exec(e))?WC(t[1],t[2]/100,t[3]/100,1):(t=b9.exec(e))?WC(t[1],t[2]/100,t[3]/100,t[4]):BC.hasOwnProperty(e)?UC(BC[e]):e==="transparent"?new Sr(NaN,NaN,NaN,0):null}function UC(e){return new Sr(e>>16&255,e>>8&255,e&255,1)}function Mf(e,t,r,n){return n<=0&&(e=t=r=NaN),new Sr(e,t,r,n)}function _9(e){return e instanceof ac||(e=yu(e)),e?(e=e.rgb(),new Sr(e.r,e.g,e.b,e.opacity)):new Sr}function uw(e,t,r,n){return arguments.length===1?_9(e):new Sr(e,t,r,n??1)}function Sr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Zx(Sr,uw,zM(ac,{brighter(e){return e=e==null?xd:Math.pow(xd,e),new Sr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?pu:Math.pow(pu,e),new Sr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Sr(qo(this.r),qo(this.g),qo(this.b),_d(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:zC,formatHex:zC,formatHex8:S9,formatRgb:HC,toString:HC}));function zC(){return`#${To(this.r)}${To(this.g)}${To(this.b)}`}function S9(){return`#${To(this.r)}${To(this.g)}${To(this.b)}${To((isNaN(this.opacity)?1:this.opacity)*255)}`}function HC(){const e=_d(this.opacity);return`${e===1?"rgb(":"rgba("}${qo(this.r)}, ${qo(this.g)}, ${qo(this.b)}${e===1?")":`, ${e})`}`}function _d(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function qo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function To(e){return e=qo(e),(e<16?"0":"")+e.toString(16)}function WC(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new hn(e,t,r,n)}function HM(e){if(e instanceof hn)return new hn(e.h,e.s,e.l,e.opacity);if(e instanceof ac||(e=yu(e)),!e)return new hn;if(e instanceof hn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),s=NaN,u=o-i,c=(o+i)/2;return u?(t===o?s=(r-n)/u+(r0&&c<1?0:s,new hn(s,u,c,e.opacity)}function O9(e,t,r,n){return arguments.length===1?HM(e):new hn(e,t,r,n??1)}function hn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Zx(hn,O9,zM(ac,{brighter(e){return e=e==null?xd:Math.pow(xd,e),new hn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?pu:Math.pow(pu,e),new hn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Sr(p0(e>=240?e-240:e+120,i,n),p0(e,i,n),p0(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new hn(VC(this.h),If(this.s),If(this.l),_d(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=_d(this.opacity);return`${e===1?"hsl(":"hsla("}${VC(this.h)}, ${If(this.s)*100}%, ${If(this.l)*100}%${e===1?")":`, ${e})`}`}}));function VC(e){return e=(e||0)%360,e<0?e+360:e}function If(e){return Math.max(0,Math.min(1,e||0))}function p0(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const e1=e=>()=>e;function E9(e,t){return function(r){return e+r*t}}function A9(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function P9(e){return(e=+e)==1?WM:function(t,r){return r-t?A9(t,r,e):e1(isNaN(t)?r:t)}}function WM(e,t){var r=t-e;return r?E9(e,r):e1(isNaN(e)?t:e)}const KC=(function e(t){var r=P9(t);function n(i,o){var s=r((i=uw(i)).r,(o=uw(o)).r),u=r(i.g,o.g),c=r(i.b,o.b),d=WM(i.opacity,o.opacity);return function(p){return i.r=s(p),i.g=u(p),i.b=c(p),i.opacity=d(p),i+""}}return n.gamma=e,n})(1);function T9(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;ir&&(o=t.slice(r,o),u[s]?u[s]+=o:u[++s]=o),(n=n[0])===(i=i[0])?u[s]?u[s]+=i:u[++s]=i:(u[++s]=null,c.push({i:s,x:Sd(n,i)})),r=m0.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function B9(e,t,r){var n=e[0],i=e[1],o=t[0],s=t[1];return i2?F9:B9,c=d=null,h}function h(y){return y==null||isNaN(y=+y)?o:(c||(c=u(e.map(n),t,r)))(n(s(y)))}return h.invert=function(y){return s(i((d||(d=u(t,e.map(n),Sd)))(y)))},h.domain=function(y){return arguments.length?(e=Array.from(y,Od),p()):e.slice()},h.range=function(y){return arguments.length?(t=Array.from(y),p()):t.slice()},h.rangeRound=function(y){return t=Array.from(y),r=t1,p()},h.clamp=function(y){return arguments.length?(s=y?!0:hr,p()):s!==hr},h.interpolate=function(y){return arguments.length?(r=y,p()):r},h.unknown=function(y){return arguments.length?(o=y,h):o},function(y,b){return n=y,i=b,p()}}function r1(){return Sh()(hr,hr)}function q9(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Ed(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function ss(e){return e=Ed(Math.abs(e)),e?e[1]:NaN}function U9(e,t){return function(r,n){for(var i=r.length,o=[],s=0,u=e[0],c=0;i>0&&u>0&&(c+u+1>n&&(u=Math.max(1,n-c)),o.push(r.substring(i-=u,i+u)),!((c+=u+1)>n));)u=e[s=(s+1)%e.length];return o.reverse().join(t)}}function z9(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var H9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function gu(e){if(!(t=H9.exec(e)))throw new Error("invalid format: "+e);var t;return new n1({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}gu.prototype=n1.prototype;function n1(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}n1.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function W9(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var Ad;function V9(e,t){var r=Ed(e,t);if(!r)return Ad=void 0,e.toPrecision(t);var n=r[0],i=r[1],o=i-(Ad=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return o===s?n:o>s?n+new Array(o-s+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Ed(e,Math.max(0,t+o-1))[0]}function GC(e,t){var r=Ed(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const YC={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:q9,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>GC(e*100,t),r:GC,s:V9,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function QC(e){return e}var JC=Array.prototype.map,ZC=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function K9(e){var t=e.grouping===void 0||e.thousands===void 0?QC:U9(JC.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?QC:z9(JC.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function d(h,y){h=gu(h);var b=h.fill,S=h.align,w=h.sign,v=h.symbol,x=h.zero,O=h.width,A=h.comma,P=h.precision,E=h.trim,T=h.type;T==="n"?(A=!0,T="g"):YC[T]||(P===void 0&&(P=12),E=!0,T="g"),(x||b==="0"&&S==="=")&&(x=!0,b="0",S="=");var j=(y&&y.prefix!==void 0?y.prefix:"")+(v==="$"?r:v==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():""),R=(v==="$"?n:/[%p]/.test(T)?s:"")+(y&&y.suffix!==void 0?y.suffix:""),N=YC[T],V=/[defgprs%]/.test(T);P=P===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,P)):Math.max(0,Math.min(20,P));function q(L){var K=j,Y=R,Q,Z,te;if(T==="c")Y=N(L)+Y,L="";else{L=+L;var G=L<0||1/L<0;if(L=isNaN(L)?c:N(Math.abs(L),P),E&&(L=W9(L)),G&&+L==0&&w!=="+"&&(G=!1),K=(G?w==="("?w:u:w==="-"||w==="("?"":w)+K,Y=(T==="s"&&!isNaN(L)&&Ad!==void 0?ZC[8+Ad/3]:"")+Y+(G&&w==="("?")":""),V){for(Q=-1,Z=L.length;++Qte||te>57){Y=(te===46?i+L.slice(Q+1):L.slice(Q))+Y,L=L.slice(0,Q);break}}}A&&!x&&(L=t(L,1/0));var re=K.length+L.length+Y.length,W=re>1)+K+L+Y+W.slice(re);break;default:L=W+K+L+Y;break}return o(L)}return q.toString=function(){return h+""},q}function p(h,y){var b=Math.max(-8,Math.min(8,Math.floor(ss(y)/3)))*3,S=Math.pow(10,-b),w=d((h=gu(h),h.type="f",h),{suffix:ZC[8+b/3]});return function(v){return w(S*v)}}return{format:d,formatPrefix:p}}var $f,i1,VM;X9({thousands:",",grouping:[3],currency:["$",""]});function X9(e){return $f=K9(e),i1=$f.format,VM=$f.formatPrefix,$f}function G9(e){return Math.max(0,-ss(Math.abs(e)))}function Y9(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ss(t)/3)))*3-ss(Math.abs(e)))}function Q9(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ss(t)-ss(e))+1}function KM(e,t,r,n){var i=sw(e,t,r),o;switch(n=gu(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=Y9(i,s))&&(n.precision=o),VM(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=Q9(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=G9(i))&&(n.precision=o-(n.type==="%")*2);break}}return i1(n)}function Qi(e){var t=e.domain;return e.ticks=function(r){var n=t();return ow(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return KM(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,s=n[i],u=n[o],c,d,p=10;for(u0;){if(d=aw(s,u,r),d===c)return n[i]=s,n[o]=u,t(n);if(d>0)s=Math.floor(s/d)*d,u=Math.ceil(u/d)*d;else if(d<0)s=Math.ceil(s*d)/d,u=Math.floor(u*d)/d;else break;c=d}return e},e}function Pd(){var e=r1();return e.copy=function(){return sc(e,Pd())},Jr.apply(e,arguments),Qi(e)}function XM(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Od),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return XM(e).unknown(t)},e=arguments.length?Array.from(e,Od):[0,1],Qi(r)}function GM(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],s;return oMath.pow(e,t)}function rV(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function rk(e){return(t,r)=>-e(-t,r)}function o1(e){const t=e(ek,tk),r=t.domain;let n=10,i,o;function s(){return i=rV(n),o=tV(n),r()[0]<0?(i=rk(i),o=rk(o),e(J9,Z9)):e(ek,tk),t}return t.base=function(u){return arguments.length?(n=+u,s()):n},t.domain=function(u){return arguments.length?(r(u),s()):r()},t.ticks=u=>{const c=r();let d=c[0],p=c[c.length-1];const h=p0){for(;y<=b;++y)for(S=1;Sp)break;x.push(w)}}else for(;y<=b;++y)for(S=n-1;S>=1;--S)if(w=y>0?S/o(-y):S*o(y),!(wp)break;x.push(w)}x.length*2{if(u==null&&(u=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=gu(c)).precision==null&&(c.trim=!0),c=i1(c)),u===1/0)return c;const d=Math.max(1,n*u/t.ticks().length);return p=>{let h=p/o(Math.round(i(p)));return h*nr(GM(r(),{floor:u=>o(Math.floor(i(u))),ceil:u=>o(Math.ceil(i(u)))})),t}function YM(){const e=o1(Sh()).domain([1,10]);return e.copy=()=>sc(e,YM()).base(e.base()),Jr.apply(e,arguments),e}function nk(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function ik(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function a1(e){var t=1,r=e(nk(t),ik(t));return r.constant=function(n){return arguments.length?e(nk(t=+n),ik(t)):t},Qi(r)}function QM(){var e=a1(Sh());return e.copy=function(){return sc(e,QM()).constant(e.constant())},Jr.apply(e,arguments)}function ok(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function nV(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function iV(e){return e<0?-e*e:e*e}function s1(e){var t=e(hr,hr),r=1;function n(){return r===1?e(hr,hr):r===.5?e(nV,iV):e(ok(r),ok(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Qi(t)}function l1(){var e=s1(Sh());return e.copy=function(){return sc(e,l1()).exponent(e.exponent())},Jr.apply(e,arguments),e}function oV(){return l1.apply(null,arguments).exponent(.5)}function ak(e){return Math.sign(e)*e*e}function aV(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function JM(){var e=r1(),t=[0,1],r=!1,n;function i(o){var s=aV(e(o));return isNaN(s)?n:r?Math.round(s):s}return i.invert=function(o){return e.invert(ak(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Od)).map(ak)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(r=!!o,i):r},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return JM(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Jr.apply(i,arguments),Qi(i)}function ZM(){var e=[],t=[],r=[],n;function i(){var s=0,u=Math.max(1,t.length);for(r=new Array(u-1);++s0?r[u-1]:e[0],u=r?[n[r-1],t]:[n[d-1],n[d]]},s.unknown=function(c){return arguments.length&&(o=c),s},s.thresholds=function(){return n.slice()},s.copy=function(){return eI().domain([e,t]).range(i).unknown(o)},Jr.apply(Qi(s),arguments)}function tI(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[oc(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var s=t.indexOf(o);return[e[s-1],e[s]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return tI().domain(e).range(t).unknown(r)},Jr.apply(i,arguments)}const y0=new Date,g0=new Date;function Bt(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const s=i(o),u=i.ceil(o);return o-s(t(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,u)=>{const c=[];if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o0))return c;let d;do c.push(d=new Date(+o)),t(o,u),e(o);while(dBt(s=>{if(s>=s)for(;e(s),!o(s);)s.setTime(s-1)},(s,u)=>{if(s>=s)if(u<0)for(;++u<=0;)for(;t(s,-1),!o(s););else for(;--u>=0;)for(;t(s,1),!o(s););}),r&&(i.count=(o,s)=>(y0.setTime(+o),g0.setTime(+s),e(y0),e(g0),Math.floor(r(y0,g0))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?s=>n(s)%o===0:s=>i.count(0,s)%o===0):i)),i}const Td=Bt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Td.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Bt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Td);Td.range;const Kn=1e3,Xr=Kn*60,Xn=Xr*60,Jn=Xn*24,u1=Jn*7,sk=Jn*30,v0=Jn*365,Co=Bt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Kn)},(e,t)=>(t-e)/Kn,e=>e.getUTCSeconds());Co.range;const c1=Bt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Kn)},(e,t)=>{e.setTime(+e+t*Xr)},(e,t)=>(t-e)/Xr,e=>e.getMinutes());c1.range;const f1=Bt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Xr)},(e,t)=>(t-e)/Xr,e=>e.getUTCMinutes());f1.range;const d1=Bt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Kn-e.getMinutes()*Xr)},(e,t)=>{e.setTime(+e+t*Xn)},(e,t)=>(t-e)/Xn,e=>e.getHours());d1.range;const h1=Bt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Xn)},(e,t)=>(t-e)/Xn,e=>e.getUTCHours());h1.range;const lc=Bt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Xr)/Jn,e=>e.getDate()-1);lc.range;const Oh=Bt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Jn,e=>e.getUTCDate()-1);Oh.range;const rI=Bt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Jn,e=>Math.floor(e/Jn));rI.range;function ra(e){return Bt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Xr)/u1)}const Eh=ra(0),Cd=ra(1),sV=ra(2),lV=ra(3),ls=ra(4),uV=ra(5),cV=ra(6);Eh.range;Cd.range;sV.range;lV.range;ls.range;uV.range;cV.range;function na(e){return Bt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/u1)}const Ah=na(0),kd=na(1),fV=na(2),dV=na(3),us=na(4),hV=na(5),pV=na(6);Ah.range;kd.range;fV.range;dV.range;us.range;hV.range;pV.range;const p1=Bt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());p1.range;const m1=Bt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());m1.range;const Zn=Bt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Zn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Bt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Zn.range;const ei=Bt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ei.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Bt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});ei.range;function nI(e,t,r,n,i,o){const s=[[Co,1,Kn],[Co,5,5*Kn],[Co,15,15*Kn],[Co,30,30*Kn],[o,1,Xr],[o,5,5*Xr],[o,15,15*Xr],[o,30,30*Xr],[i,1,Xn],[i,3,3*Xn],[i,6,6*Xn],[i,12,12*Xn],[n,1,Jn],[n,2,2*Jn],[r,1,u1],[t,1,sk],[t,3,3*sk],[e,1,v0]];function u(d,p,h){const y=pv).right(s,y);if(b===s.length)return e.every(sw(d/v0,p/v0,h));if(b===0)return Td.every(Math.max(sw(d,p,h),1));const[S,w]=s[y/s[b-1][2]53)return null;"w"in oe||(oe.w=1),"Z"in oe?(Ce=w0(Rl(oe.y,0,1)),dt=Ce.getUTCDay(),Ce=dt>4||dt===0?kd.ceil(Ce):kd(Ce),Ce=Oh.offset(Ce,(oe.V-1)*7),oe.y=Ce.getUTCFullYear(),oe.m=Ce.getUTCMonth(),oe.d=Ce.getUTCDate()+(oe.w+6)%7):(Ce=b0(Rl(oe.y,0,1)),dt=Ce.getDay(),Ce=dt>4||dt===0?Cd.ceil(Ce):Cd(Ce),Ce=lc.offset(Ce,(oe.V-1)*7),oe.y=Ce.getFullYear(),oe.m=Ce.getMonth(),oe.d=Ce.getDate()+(oe.w+6)%7)}else("W"in oe||"U"in oe)&&("w"in oe||(oe.w="u"in oe?oe.u%7:"W"in oe?1:0),dt="Z"in oe?w0(Rl(oe.y,0,1)).getUTCDay():b0(Rl(oe.y,0,1)).getDay(),oe.m=0,oe.d="W"in oe?(oe.w+6)%7+oe.W*7-(dt+5)%7:oe.w+oe.U*7-(dt+6)%7);return"Z"in oe?(oe.H+=oe.Z/100|0,oe.M+=oe.Z%100,w0(oe)):b0(oe)}}function R(ie,Ee,Re,oe){for(var Le=0,Ce=Ee.length,dt=Re.length,at,rt;Le=dt)return-1;if(at=Ee.charCodeAt(Le++),at===37){if(at=Ee.charAt(Le++),rt=E[at in lk?Ee.charAt(Le++):at],!rt||(oe=rt(ie,Re,oe))<0)return-1}else if(at!=Re.charCodeAt(oe++))return-1}return oe}function N(ie,Ee,Re){var oe=d.exec(Ee.slice(Re));return oe?(ie.p=p.get(oe[0].toLowerCase()),Re+oe[0].length):-1}function V(ie,Ee,Re){var oe=b.exec(Ee.slice(Re));return oe?(ie.w=S.get(oe[0].toLowerCase()),Re+oe[0].length):-1}function q(ie,Ee,Re){var oe=h.exec(Ee.slice(Re));return oe?(ie.w=y.get(oe[0].toLowerCase()),Re+oe[0].length):-1}function L(ie,Ee,Re){var oe=x.exec(Ee.slice(Re));return oe?(ie.m=O.get(oe[0].toLowerCase()),Re+oe[0].length):-1}function K(ie,Ee,Re){var oe=w.exec(Ee.slice(Re));return oe?(ie.m=v.get(oe[0].toLowerCase()),Re+oe[0].length):-1}function Y(ie,Ee,Re){return R(ie,t,Ee,Re)}function Q(ie,Ee,Re){return R(ie,r,Ee,Re)}function Z(ie,Ee,Re){return R(ie,n,Ee,Re)}function te(ie){return s[ie.getDay()]}function G(ie){return o[ie.getDay()]}function re(ie){return c[ie.getMonth()]}function W(ie){return u[ie.getMonth()]}function I(ie){return i[+(ie.getHours()>=12)]}function z(ie){return 1+~~(ie.getMonth()/3)}function le(ie){return s[ie.getUTCDay()]}function pe(ie){return o[ie.getUTCDay()]}function he(ie){return c[ie.getUTCMonth()]}function we(ie){return u[ie.getUTCMonth()]}function ye(ie){return i[+(ie.getUTCHours()>=12)]}function Ae(ie){return 1+~~(ie.getUTCMonth()/3)}return{format:function(ie){var Ee=T(ie+="",A);return Ee.toString=function(){return ie},Ee},parse:function(ie){var Ee=j(ie+="",!1);return Ee.toString=function(){return ie},Ee},utcFormat:function(ie){var Ee=T(ie+="",P);return Ee.toString=function(){return ie},Ee},utcParse:function(ie){var Ee=j(ie+="",!0);return Ee.toString=function(){return ie},Ee}}}var lk={"-":"",_:" ",0:"0"},Kt=/^\s*\d+/,wV=/^%/,xV=/[\\^$*+?|[\]().{}]/g;function Xe(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o[t.toLowerCase(),r]))}function SV(e,t,r){var n=Kt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function OV(e,t,r){var n=Kt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function EV(e,t,r){var n=Kt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function AV(e,t,r){var n=Kt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function PV(e,t,r){var n=Kt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function uk(e,t,r){var n=Kt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function ck(e,t,r){var n=Kt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function TV(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function CV(e,t,r){var n=Kt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function kV(e,t,r){var n=Kt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function fk(e,t,r){var n=Kt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function jV(e,t,r){var n=Kt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function dk(e,t,r){var n=Kt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function RV(e,t,r){var n=Kt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function NV(e,t,r){var n=Kt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function MV(e,t,r){var n=Kt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function IV(e,t,r){var n=Kt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function $V(e,t,r){var n=wV.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function DV(e,t,r){var n=Kt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function LV(e,t,r){var n=Kt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function hk(e,t){return Xe(e.getDate(),t,2)}function BV(e,t){return Xe(e.getHours(),t,2)}function FV(e,t){return Xe(e.getHours()%12||12,t,2)}function qV(e,t){return Xe(1+lc.count(Zn(e),e),t,3)}function iI(e,t){return Xe(e.getMilliseconds(),t,3)}function UV(e,t){return iI(e,t)+"000"}function zV(e,t){return Xe(e.getMonth()+1,t,2)}function HV(e,t){return Xe(e.getMinutes(),t,2)}function WV(e,t){return Xe(e.getSeconds(),t,2)}function VV(e){var t=e.getDay();return t===0?7:t}function KV(e,t){return Xe(Eh.count(Zn(e)-1,e),t,2)}function oI(e){var t=e.getDay();return t>=4||t===0?ls(e):ls.ceil(e)}function XV(e,t){return e=oI(e),Xe(ls.count(Zn(e),e)+(Zn(e).getDay()===4),t,2)}function GV(e){return e.getDay()}function YV(e,t){return Xe(Cd.count(Zn(e)-1,e),t,2)}function QV(e,t){return Xe(e.getFullYear()%100,t,2)}function JV(e,t){return e=oI(e),Xe(e.getFullYear()%100,t,2)}function ZV(e,t){return Xe(e.getFullYear()%1e4,t,4)}function eK(e,t){var r=e.getDay();return e=r>=4||r===0?ls(e):ls.ceil(e),Xe(e.getFullYear()%1e4,t,4)}function tK(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Xe(t/60|0,"0",2)+Xe(t%60,"0",2)}function pk(e,t){return Xe(e.getUTCDate(),t,2)}function rK(e,t){return Xe(e.getUTCHours(),t,2)}function nK(e,t){return Xe(e.getUTCHours()%12||12,t,2)}function iK(e,t){return Xe(1+Oh.count(ei(e),e),t,3)}function aI(e,t){return Xe(e.getUTCMilliseconds(),t,3)}function oK(e,t){return aI(e,t)+"000"}function aK(e,t){return Xe(e.getUTCMonth()+1,t,2)}function sK(e,t){return Xe(e.getUTCMinutes(),t,2)}function lK(e,t){return Xe(e.getUTCSeconds(),t,2)}function uK(e){var t=e.getUTCDay();return t===0?7:t}function cK(e,t){return Xe(Ah.count(ei(e)-1,e),t,2)}function sI(e){var t=e.getUTCDay();return t>=4||t===0?us(e):us.ceil(e)}function fK(e,t){return e=sI(e),Xe(us.count(ei(e),e)+(ei(e).getUTCDay()===4),t,2)}function dK(e){return e.getUTCDay()}function hK(e,t){return Xe(kd.count(ei(e)-1,e),t,2)}function pK(e,t){return Xe(e.getUTCFullYear()%100,t,2)}function mK(e,t){return e=sI(e),Xe(e.getUTCFullYear()%100,t,2)}function yK(e,t){return Xe(e.getUTCFullYear()%1e4,t,4)}function gK(e,t){var r=e.getUTCDay();return e=r>=4||r===0?us(e):us.ceil(e),Xe(e.getUTCFullYear()%1e4,t,4)}function vK(){return"+0000"}function mk(){return"%"}function yk(e){return+e}function gk(e){return Math.floor(+e/1e3)}var Ra,lI,uI;bK({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function bK(e){return Ra=bV(e),lI=Ra.format,Ra.parse,uI=Ra.utcFormat,Ra.utcParse,Ra}function wK(e){return new Date(e)}function xK(e){return e instanceof Date?+e:+new Date(+e)}function y1(e,t,r,n,i,o,s,u,c,d){var p=r1(),h=p.invert,y=p.domain,b=d(".%L"),S=d(":%S"),w=d("%I:%M"),v=d("%I %p"),x=d("%a %d"),O=d("%b %d"),A=d("%B"),P=d("%Y");function E(T){return(c(T)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,o)=>c9(e,o/n))},r.copy=function(){return hI(t).domain(e)},ii.apply(r,arguments)}function Th(){var e=0,t=.5,r=1,n=1,i,o,s,u,c,d=hr,p,h=!1,y;function b(w){return isNaN(w=+w)?y:(w=.5+((w=+p(w))-o)*(n*wr}return _0=e,_0}var S0,xk;function AK(){if(xk)return S0;xk=1;var e=Ch(),t=gI(),r=Ns();function n(i){return i&&i.length?e(i,r,t):void 0}return S0=n,S0}var PK=AK();const kh=tt(PK);var O0,_k;function vI(){if(_k)return O0;_k=1;function e(t,r){return te.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};be.decimalPlaces=be.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*mt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};be.dividedBy=be.div=function(e){return Qn(this,new this.constructor(e))};be.dividedToIntegerBy=be.idiv=function(e){var t=this,r=t.constructor;return ot(Qn(t,new r(e),0,1),r.precision)};be.equals=be.eq=function(e){return!this.cmp(e)};be.exponent=function(){return jt(this)};be.greaterThan=be.gt=function(e){return this.cmp(e)>0};be.greaterThanOrEqualTo=be.gte=function(e){return this.cmp(e)>=0};be.isInteger=be.isint=function(){return this.e>this.d.length-2};be.isNegative=be.isneg=function(){return this.s<0};be.isPositive=be.ispos=function(){return this.s>0};be.isZero=function(){return this.s===0};be.lessThan=be.lt=function(e){return this.cmp(e)<0};be.lessThanOrEqualTo=be.lte=function(e){return this.cmp(e)<1};be.logarithm=be.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Rr))throw Error(Yr+"NaN");if(r.s<1)throw Error(Yr+(r.s?"NaN":"-Infinity"));return r.eq(Rr)?new n(0):(gt=!1,t=Qn(vu(r,o),vu(e,o),o),gt=!0,ot(t,i))};be.minus=be.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_I(t,e):wI(t,(e.s=-e.s,e))};be.modulo=be.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Yr+"NaN");return r.s?(gt=!1,t=Qn(r,e,0,1).times(e),gt=!0,r.minus(t)):ot(new n(r),i)};be.naturalExponential=be.exp=function(){return xI(this)};be.naturalLogarithm=be.ln=function(){return vu(this)};be.negated=be.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};be.plus=be.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?wI(t,e):_I(t,(e.s=-e.s,e))};be.precision=be.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Uo+e);if(t=jt(i)+1,n=i.d.length-1,r=n*mt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};be.squareRoot=be.sqrt=function(){var e,t,r,n,i,o,s,u=this,c=u.constructor;if(u.s<1){if(!u.s)return new c(0);throw Error(Yr+"NaN")}for(e=jt(u),gt=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=Sn(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Ds((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new c(t)):n=new c(i.toString()),r=c.precision,i=s=r+3;;)if(o=n,n=o.plus(Qn(u,o,s+2)).times(.5),Sn(o.d).slice(0,s)===(t=Sn(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(ot(o,r+1,0),o.times(o).eq(u)){n=o;break}}else if(t!="9999")break;s+=4}return gt=!0,ot(n,r)};be.times=be.mul=function(e){var t,r,n,i,o,s,u,c,d,p=this,h=p.constructor,y=p.d,b=(e=new h(e)).d;if(!p.s||!e.s)return new h(0);for(e.s*=p.s,r=p.e+e.e,c=y.length,d=b.length,c=0;){for(t=0,i=c+n;i>n;)u=o[i]+b[n]*y[i-n-1]+t,o[i--]=u%Ht|0,t=u/Ht|0;o[i]=(o[i]+t)%Ht|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,gt?ot(e,h.precision):e};be.toDecimalPlaces=be.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Cn(e,0,$s),t===void 0?t=n.rounding:Cn(t,0,8),ot(r,e+jt(r)+1,t))};be.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Yo(n,!0):(Cn(e,0,$s),t===void 0?t=i.rounding:Cn(t,0,8),n=ot(new i(n),e+1,t),r=Yo(n,!0,e+1)),r};be.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Yo(i):(Cn(e,0,$s),t===void 0?t=o.rounding:Cn(t,0,8),n=ot(new o(i),e+jt(i)+1,t),r=Yo(n.abs(),!1,e+jt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};be.toInteger=be.toint=function(){var e=this,t=e.constructor;return ot(new t(e),jt(e)+1,t.rounding)};be.toNumber=function(){return+this};be.toPower=be.pow=function(e){var t,r,n,i,o,s,u=this,c=u.constructor,d=12,p=+(e=new c(e));if(!e.s)return new c(Rr);if(u=new c(u),!u.s){if(e.s<1)throw Error(Yr+"Infinity");return u}if(u.eq(Rr))return u;if(n=c.precision,e.eq(Rr))return ot(u,n);if(t=e.e,r=e.d.length-1,s=t>=r,o=u.s,s){if((r=p<0?-p:p)<=bI){for(i=new c(Rr),t=Math.ceil(n/mt+4),gt=!1;r%2&&(i=i.times(u),Tk(i.d,t)),r=Ds(r/2),r!==0;)u=u.times(u),Tk(u.d,t);return gt=!0,e.s<0?new c(Rr).div(i):ot(i,n)}}else if(o<0)throw Error(Yr+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,u.s=1,gt=!1,i=e.times(vu(u,n+d)),gt=!0,i=xI(i),i.s=o,i};be.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=jt(i),n=Yo(i,r<=o.toExpNeg||r>=o.toExpPos)):(Cn(e,1,$s),t===void 0?t=o.rounding:Cn(t,0,8),i=ot(new o(i),e,t),r=jt(i),n=Yo(i,e<=r||r<=o.toExpNeg,e)),n};be.toSignificantDigits=be.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Cn(e,1,$s),t===void 0?t=n.rounding:Cn(t,0,8)),ot(new n(r),e,t)};be.toString=be.valueOf=be.val=be.toJSON=be[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=jt(e),r=e.constructor;return Yo(e,t<=r.toExpNeg||t>=r.toExpPos)};function wI(e,t){var r,n,i,o,s,u,c,d,p=e.constructor,h=p.precision;if(!e.s||!t.s)return t.s||(t=new p(e)),gt?ot(t,h):t;if(c=e.d,d=t.d,s=e.e,i=t.e,c=c.slice(),o=s-i,o){for(o<0?(n=c,o=-o,u=d.length):(n=d,i=s,u=c.length),s=Math.ceil(h/mt),u=s>u?s+1:u+1,o>u&&(o=u,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(u=c.length,o=d.length,u-o<0&&(o=u,n=d,d=c,c=n),r=0;o;)r=(c[--o]=c[o]+d[o]+r)/Ht|0,c[o]%=Ht;for(r&&(c.unshift(r),++i),u=c.length;c[--u]==0;)c.pop();return t.d=c,t.e=i,gt?ot(t,h):t}function Cn(e,t,r){if(e!==~~e||er)throw Error(Uo+e)}function Sn(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;ts?1:-1;else for(u=c=0;ui[u]?1:-1;break}return c}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]1;)n.shift()}return function(n,i,o,s){var u,c,d,p,h,y,b,S,w,v,x,O,A,P,E,T,j,R,N=n.constructor,V=n.s==i.s?1:-1,q=n.d,L=i.d;if(!n.s)return new N(n);if(!i.s)throw Error(Yr+"Division by zero");for(c=n.e-i.e,j=L.length,E=q.length,b=new N(V),S=b.d=[],d=0;L[d]==(q[d]||0);)++d;if(L[d]>(q[d]||0)&&--c,o==null?O=o=N.precision:s?O=o+(jt(n)-jt(i))+1:O=o,O<0)return new N(0);if(O=O/mt+2|0,d=0,j==1)for(p=0,L=L[0],O++;(d1&&(L=e(L,p),q=e(q,p),j=L.length,E=q.length),P=j,w=q.slice(0,j),v=w.length;v=Ht/2&&++T;do p=0,u=t(L,w,j,v),u<0?(x=w[0],j!=v&&(x=x*Ht+(w[1]||0)),p=x/T|0,p>1?(p>=Ht&&(p=Ht-1),h=e(L,p),y=h.length,v=w.length,u=t(h,w,y,v),u==1&&(p--,r(h,j16)throw Error(b1+jt(e));if(!e.s)return new p(Rr);for(gt=!1,u=h,s=new p(.03125);e.abs().gte(.1);)e=e.times(s),d+=5;for(n=Math.log(_o(2,d))/Math.LN10*2+5|0,u+=n,r=i=o=new p(Rr),p.precision=u;;){if(i=ot(i.times(e),u),r=r.times(++c),s=o.plus(Qn(i,r,u)),Sn(s.d).slice(0,u)===Sn(o.d).slice(0,u)){for(;d--;)o=ot(o.times(o),u);return p.precision=h,t==null?(gt=!0,ot(o,h)):o}o=s}}function jt(e){for(var t=e.e*mt,r=e.d[0];r>=10;r/=10)t++;return t}function C0(e,t,r){if(t>e.LN10.sd())throw gt=!0,r&&(e.precision=r),Error(Yr+"LN10 precision limit exceeded");return ot(new e(e.LN10),t)}function ki(e){for(var t="";e--;)t+="0";return t}function vu(e,t){var r,n,i,o,s,u,c,d,p,h=1,y=10,b=e,S=b.d,w=b.constructor,v=w.precision;if(b.s<1)throw Error(Yr+(b.s?"NaN":"-Infinity"));if(b.eq(Rr))return new w(0);if(t==null?(gt=!1,d=v):d=t,b.eq(10))return t==null&&(gt=!0),C0(w,d);if(d+=y,w.precision=d,r=Sn(S),n=r.charAt(0),o=jt(b),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=Sn(b.d),n=r.charAt(0),h++;o=jt(b),n>1?(b=new w("0."+r),o++):b=new w(n+"."+r.slice(1))}else return c=C0(w,d+2,v).times(o+""),b=vu(new w(n+"."+r.slice(1)),d-y).plus(c),w.precision=v,t==null?(gt=!0,ot(b,v)):b;for(u=s=b=Qn(b.minus(Rr),b.plus(Rr),d),p=ot(b.times(b),d),i=3;;){if(s=ot(s.times(p),d),c=u.plus(Qn(s,new w(i),d)),Sn(c.d).slice(0,d)===Sn(u.d).slice(0,d))return u=u.times(2),o!==0&&(u=u.plus(C0(w,d+2,v).times(o+""))),u=Qn(u,new w(h),d),w.precision=v,t==null?(gt=!0,ot(u,v)):u;u=c,i+=2}}function Pk(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Ds(r/mt),e.d=[],n=(r+1)%mt,r<0&&(n+=mt),njd||e.e<-jd))throw Error(b1+r)}else e.s=0,e.e=0,e.d=[0];return e}function ot(e,t,r){var n,i,o,s,u,c,d,p,h=e.d;for(s=1,o=h[0];o>=10;o/=10)s++;if(n=t-s,n<0)n+=mt,i=t,d=h[p=0];else{if(p=Math.ceil((n+1)/mt),o=h.length,p>=o)return e;for(d=o=h[p],s=1;o>=10;o/=10)s++;n%=mt,i=n-mt+s}if(r!==void 0&&(o=_o(10,s-i-1),u=d/o%10|0,c=t<0||h[p+1]!==void 0||d%o,c=r<4?(u||c)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||c||r==6&&(n>0?i>0?d/_o(10,s-i):0:h[p-1])%10&1||r==(e.s<0?8:7))),t<1||!h[0])return c?(o=jt(e),h.length=1,t=t-o-1,h[0]=_o(10,(mt-t%mt)%mt),e.e=Ds(-t/mt)||0):(h.length=1,h[0]=e.e=e.s=0),e;if(n==0?(h.length=p,o=1,p--):(h.length=p+1,o=_o(10,mt-n),h[p]=i>0?(d/_o(10,s-i)%_o(10,i)|0)*o:0),c)for(;;)if(p==0){(h[0]+=o)==Ht&&(h[0]=1,++e.e);break}else{if(h[p]+=o,h[p]!=Ht)break;h[p--]=0,o=1}for(n=h.length;h[--n]===0;)h.pop();if(gt&&(e.e>jd||e.e<-jd))throw Error(b1+jt(e));return e}function _I(e,t){var r,n,i,o,s,u,c,d,p,h,y=e.constructor,b=y.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new y(e),gt?ot(t,b):t;if(c=e.d,h=t.d,n=t.e,d=e.e,c=c.slice(),s=d-n,s){for(p=s<0,p?(r=c,s=-s,u=h.length):(r=h,n=d,u=c.length),i=Math.max(Math.ceil(b/mt),u)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=c.length,u=h.length,p=i0;--i)c[u++]=0;for(i=h.length;i>s;){if(c[--i]0?o=o.charAt(0)+"."+o.slice(1)+ki(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+ki(-i-1)+o,r&&(n=r-s)>0&&(o+=ki(n))):i>=s?(o+=ki(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+ki(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=ki(n))),e.s<0?"-"+o:o}function Tk(e,t){if(e.length>t)return e.length=t,!0}function SI(e){var t,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Uo+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return Pk(s,o.toString())}else if(typeof o!="string")throw Error(Uo+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,DK.test(o))Pk(s,o);else throw Error(Uo+o)}if(i.prototype=be,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=SI,i.config=i.set=LK,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Uo+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Uo+r+": "+n);return this}var w1=SI($K);Rr=new w1(1);const nt=w1;function BK(e){return zK(e)||UK(e)||qK(e)||FK()}function FK(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qK(e,t){if(e){if(typeof e=="string")return dw(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dw(e,t)}}function UK(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function zK(e){if(Array.isArray(e))return dw(e)}function dw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t?r.apply(void 0,i):e(t-s,Ck(function(){for(var u=arguments.length,c=new Array(u),d=0;de.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,o=void 0;try{for(var s=e[Symbol.iterator](),u;!(n=(u=s.next()).done)&&(r.push(u.value),!(t&&r.length===t));n=!0);}catch(c){i=!0,o=c}finally{try{!n&&s.return!=null&&s.return()}finally{if(i)throw o}}return r}}function iX(e){if(Array.isArray(e))return e}function TI(e){var t=bu(e,2),r=t[0],n=t[1],i=r,o=n;return r>n&&(i=n,o=r),[i,o]}function CI(e,t,r){if(e.lte(0))return new nt(0);var n=Mh.getDigitCount(e.toNumber()),i=new nt(10).pow(n),o=e.div(i),s=n!==1?.05:.1,u=new nt(Math.ceil(o.div(s).toNumber())).add(r).mul(s),c=u.mul(i);return t?c:new nt(Math.ceil(c))}function oX(e,t,r){var n=1,i=new nt(e);if(!i.isint()&&r){var o=Math.abs(e);o<1?(n=new nt(10).pow(Mh.getDigitCount(e)-1),i=new nt(Math.floor(i.div(n).toNumber())).mul(n)):o>1&&(i=new nt(Math.floor(e)))}else e===0?i=new nt(Math.floor((t-1)/2)):r||(i=new nt(Math.floor(e)));var s=Math.floor((t-1)/2),u=KK(VK(function(c){return i.add(new nt(c-s).mul(n)).toNumber()}),hw);return u(0,t)}function kI(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new nt(0),tickMin:new nt(0),tickMax:new nt(0)};var o=CI(new nt(t).sub(e).div(r-1),n,i),s;e<=0&&t>=0?s=new nt(0):(s=new nt(e).add(t).div(2),s=s.sub(new nt(s).mod(o)));var u=Math.ceil(s.sub(e).div(o).toNumber()),c=Math.ceil(new nt(t).sub(s).div(o).toNumber()),d=u+c+1;return d>r?kI(e,t,r,n,i+1):(d0?c+(r-d):c,u=t>0?u:u+(r-d)),{step:o,tickMin:s.sub(new nt(u).mul(o)),tickMax:s.add(new nt(c).mul(o))})}function aX(e){var t=bu(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(i,2),u=TI([r,n]),c=bu(u,2),d=c[0],p=c[1];if(d===-1/0||p===1/0){var h=p===1/0?[d].concat(mw(hw(0,i-1).map(function(){return 1/0}))):[].concat(mw(hw(0,i-1).map(function(){return-1/0})),[p]);return r>n?pw(h):h}if(d===p)return oX(d,i,o);var y=kI(d,p,s,o),b=y.step,S=y.tickMin,w=y.tickMax,v=Mh.rangeStep(S,w.add(new nt(.1).mul(b)),b);return r>n?pw(v):v}function sX(e,t){var r=bu(e,2),n=r[0],i=r[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=TI([n,i]),u=bu(s,2),c=u[0],d=u[1];if(c===-1/0||d===1/0)return[n,i];if(c===d)return[c];var p=Math.max(t,2),h=CI(new nt(d).sub(c).div(p-1),o,0),y=[].concat(mw(Mh.rangeStep(new nt(c),new nt(d).sub(new nt(.99).mul(h)),h)),[d]);return n>i?pw(y):y}var lX=AI(aX),uX=AI(sX),cX="Invariant failed";function Qo(e,t){throw new Error(cX)}var fX=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function cs(e){"@babel/helpers - typeof";return cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cs(e)}function Rd(){return Rd=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function vX(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function bX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wX(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,s=-1,u=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(u<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var c=o.range,d=0;d0?i[d-1].coordinate:i[u-1].coordinate,h=i[d].coordinate,y=d>=u-1?i[0].coordinate:i[d+1].coordinate,b=void 0;if(fr(h-p)!==fr(y-h)){var S=[];if(fr(y-h)===fr(c[1]-c[0])){b=y;var w=h+c[1]-c[0];S[0]=Math.min(w,(w+p)/2),S[1]=Math.max(w,(w+p)/2)}else{b=p;var v=y+c[1]-c[0];S[0]=Math.min(h,(v+h)/2),S[1]=Math.max(h,(v+h)/2)}var x=[Math.min(h,(b+h)/2),Math.max(h,(b+h)/2)];if(t>x[0]&&t<=x[1]||t>=S[0]&&t<=S[1]){s=i[d].index;break}}else{var O=Math.min(p,y),A=Math.max(p,y);if(t>(O+h)/2&&t<=(A+h)/2){s=i[d].index;break}}}else for(var P=0;P0&&P(n[P].coordinate+n[P-1].coordinate)/2&&t<=(n[P].coordinate+n[P+1].coordinate)/2||P===u-1&&t>(n[P].coordinate+n[P-1].coordinate)/2){s=n[P].index;break}return s},x1=function(t){var r,n=t,i=n.type.displayName,o=(r=t.type)!==null&&r!==void 0&&r.defaultProps?St(St({},t.type.defaultProps),t.props):t.props,s=o.stroke,u=o.fill,c;switch(i){case"Line":c=s;break;case"Area":case"Radar":c=s&&s!=="none"?s:u;break;default:c=u;break}return c},DX=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var s={},u=Object.keys(o),c=0,d=u.length;c=0});if(x&&x.length){var O=x[0].type.defaultProps,A=O!==void 0?St(St({},O),x[0].props):x[0].props,P=A.barSize,E=A[v];s[E]||(s[E]=[]);var T=Ue(P)?r:P;s[E].push({item:x[0],stackList:x.slice(1),barSize:Ue(T)?void 0:dr(T,n,0)})}}return s},LX=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,o=t.sizeList,s=o===void 0?[]:o,u=t.maxBarSize,c=s.length;if(c<1)return null;var d=dr(r,i,0,!0),p,h=[];if(s[0].barSize===+s[0].barSize){var y=!1,b=i/c,S=s.reduce(function(P,E){return P+E.barSize||0},0);S+=(c-1)*d,S>=i&&(S-=(c-1)*d,d=0),S>=i&&b>0&&(y=!0,b*=.9,S=c*b);var w=(i-S)/2>>0,v={offset:w-d,size:0};p=s.reduce(function(P,E){var T={item:E.item,position:{offset:v.offset+v.size+d,size:y?b:E.barSize}},j=[].concat(Rk(P),[T]);return v=j[j.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function(R){j.push({item:R,position:v})}),j},h)}else{var x=dr(n,i,0,!0);i-2*x-(c-1)*d<=0&&(d=0);var O=(i-2*x-(c-1)*d)/c;O>1&&(O>>=0);var A=u===+u?Math.min(O,u):O;p=s.reduce(function(P,E,T){var j=[].concat(Rk(P),[{item:E.item,position:{offset:x+(O+d)*T+(O-A)/2,size:A}}]);return E.stackList&&E.stackList.length&&E.stackList.forEach(function(R){j.push({item:R,position:j[j.length-1].position})}),j},h)}return p},BX=function(t,r,n,i){var o=n.children,s=n.width,u=n.margin,c=s-(u.left||0)-(u.right||0),d=MI({children:o,legendWidth:c});if(d){var p=i||{},h=p.width,y=p.height,b=d.align,S=d.verticalAlign,w=d.layout;if((w==="vertical"||w==="horizontal"&&S==="middle")&&b!=="center"&&fe(t[b]))return St(St({},t),{},za({},b,t[b]+(h||0)));if((w==="horizontal"||w==="vertical"&&b==="center")&&S!=="middle"&&fe(t[S]))return St(St({},t),{},za({},S,t[S]+(y||0)))}return t},FX=function(t,r,n){return Ue(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},II=function(t,r,n,i,o){var s=r.props.children,u=Gr(s,Ih).filter(function(d){return FX(i,o,d.props.direction)});if(u&&u.length){var c=u.map(function(d){return d.props.dataKey});return t.reduce(function(d,p){var h=ar(p,n);if(Ue(h))return d;var y=Array.isArray(h)?[jh(h),kh(h)]:[h,h],b=c.reduce(function(S,w){var v=ar(p,w,0),x=y[0]-Math.abs(Array.isArray(v)?v[0]:v),O=y[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(x,S[0]),Math.max(O,S[1])]},[1/0,-1/0]);return[Math.min(b[0],d[0]),Math.max(b[1],d[1])]},[1/0,-1/0])}return null},qX=function(t,r,n,i,o){var s=r.map(function(u){return II(t,u,n,o,i)}).filter(function(u){return!Ue(u)});return s&&s.length?s.reduce(function(u,c){return[Math.min(u[0],c[0]),Math.max(u[1],c[1])]},[1/0,-1/0]):null},$I=function(t,r,n,i,o){var s=r.map(function(c){var d=c.props.dataKey;return n==="number"&&d&&II(t,c,d,i)||Yl(t,d,n,o)});if(n==="number")return s.reduce(function(c,d){return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);var u={};return s.reduce(function(c,d){for(var p=0,h=d.length;p=2?fr(u[0]-u[1])*2*d:d,r&&(t.ticks||t.niceTicks)){var p=(t.ticks||t.niceTicks).map(function(h){var y=o?o.indexOf(h):h;return{coordinate:i(y)+d,value:h,offset:d}});return p.filter(function(h){return!tc(h.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(h,y){return{coordinate:i(h)+d,value:h,index:y,offset:d}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(h){return{coordinate:i(h)+d,value:h,offset:d}}):i.domain().map(function(h,y){return{coordinate:i(h)+d,value:o?o[h]:h,index:y,offset:d}})},k0=new WeakMap,Df=function(t,r){if(typeof r!="function")return t;k0.has(t)||k0.set(t,new WeakMap);var n=k0.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},LI=function(t,r,n){var i=t.scale,o=t.type,s=t.layout,u=t.axisType;if(i==="auto")return s==="radial"&&u==="radiusAxis"?{scale:hu(),realScaleType:"band"}:s==="radial"&&u==="angleAxis"?{scale:Pd(),realScaleType:"linear"}:o==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Gl(),realScaleType:"point"}:o==="category"?{scale:hu(),realScaleType:"band"}:{scale:Pd(),realScaleType:"linear"};if(Ko(i)){var c="scale".concat(yh(i));return{scale:(vk[c]||Gl)(),realScaleType:vk[c]?c:"point"}}return De(i)?{scale:i}:{scale:Gl(),realScaleType:"point"}},Mk=1e-4,BI=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),o=Math.min(i[0],i[1])-Mk,s=Math.max(i[0],i[1])+Mk,u=t(r[0]),c=t(r[n-1]);(us||cs)&&t.domain([r[0],r[n-1]])}},UX=function(t,r){if(!t)return null;for(var n=0,i=t.length;ni)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]=0?(t[u][n][0]=o,t[u][n][1]=o+c,o=t[u][n][1]):(t[u][n][0]=s,t[u][n][1]=s+c,s=t[u][n][1])}},WX=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n=0?(t[s][n][0]=o,t[s][n][1]=o+u,o=t[s][n][1]):(t[s][n][0]=0,t[s][n][1]=0)}},VX={sign:HX,expand:Nz,none:rs,silhouette:Mz,wiggle:Iz,positive:WX},KX=function(t,r,n){var i=r.map(function(u){return u.props.dataKey}),o=VX[n],s=Rz().keys(i).value(function(u,c){return+ar(u,c,0)}).order(Kb).offset(o);return s(t)},XX=function(t,r,n,i,o,s){if(!t)return null;var u=s?r.reverse():r,c={},d=u.reduce(function(h,y){var b,S=(b=y.type)!==null&&b!==void 0&&b.defaultProps?St(St({},y.type.defaultProps),y.props):y.props,w=S.stackId,v=S.hide;if(v)return h;var x=S[n],O=h[x]||{hasStack:!1,stackGroups:{}};if(Lt(w)){var A=O.stackGroups[w]||{numericAxisId:n,cateAxisId:i,items:[]};A.items.push(y),O.hasStack=!0,O.stackGroups[w]=A}else O.stackGroups[rc("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[y]};return St(St({},h),{},za({},x,O))},c),p={};return Object.keys(d).reduce(function(h,y){var b=d[y];if(b.hasStack){var S={};b.stackGroups=Object.keys(b.stackGroups).reduce(function(w,v){var x=b.stackGroups[v];return St(St({},w),{},za({},v,{numericAxisId:n,cateAxisId:i,items:x.items,stackedData:KX(t,x.items,o)}))},S)}return St(St({},h),{},za({},y,b))},p)},FI=function(t,r){var n=r.realScaleType,i=r.type,o=r.tickCount,s=r.originalDomain,u=r.allowDecimals,c=n||r.scale;if(c!=="auto"&&c!=="linear")return null;if(o&&i==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var d=t.domain();if(!d.length)return null;var p=lX(d,o,u);return t.domain([jh(p),kh(p)]),{niceTicks:p}}if(o&&i==="number"){var h=t.domain(),y=uX(h,o,u);return{niceTicks:y}}return null},Ik=function(t){var r=t.axis,n=t.ticks,i=t.offset,o=t.bandSize,s=t.entry,u=t.index;if(r.type==="category")return n[u]?n[u].coordinate+i:null;var c=ar(s,r.dataKey,r.domain[u]);return Ue(c)?null:r.scale(c)-o/2+i},GX=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]);return i<=0&&o>=0?0:o<0?o:i}return n[0]},YX=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?St(St({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(Lt(o)){var s=r[o];if(s){var u=s.items.indexOf(t);return u>=0?s.stackedData[u]:null}}return null},QX=function(t){return t.reduce(function(r,n){return[jh(n.concat([r[0]]).filter(fe)),kh(n.concat([r[1]]).filter(fe))]},[1/0,-1/0])},qI=function(t,r,n){return Object.keys(t).reduce(function(i,o){var s=t[o],u=s.stackedData,c=u.reduce(function(d,p){var h=QX(p.slice(r,n+1));return[Math.min(d[0],h[0]),Math.max(d[1],h[1])]},[1/0,-1/0]);return[Math.min(c[0],i[0]),Math.max(c[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},$k=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Dk=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,bw=function(t,r,n){if(De(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(fe(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if($k.test(t[0])){var o=+$k.exec(t[0])[1];i[0]=r[0]-o}else De(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(fe(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(Dk.test(t[1])){var s=+Dk.exec(t[1])[1];i[1]=r[1]+s}else De(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},Md=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var o=Gx(r,function(h){return h.coordinate}),s=1/0,u=1,c=o.length;ue.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},aG=function(t,r,n,i,o){var s=t.width,u=t.height,c=t.startAngle,d=t.endAngle,p=dr(t.cx,s,s/2),h=dr(t.cy,u,u/2),y=HI(s,u,n),b=dr(t.innerRadius,y,0),S=dr(t.outerRadius,y,y*.8),w=Object.keys(r);return w.reduce(function(v,x){var O=r[x],A=O.domain,P=O.reversed,E;if(Ue(O.range))i==="angleAxis"?E=[c,d]:i==="radiusAxis"&&(E=[b,S]),P&&(E=[E[1],E[0]]);else{E=O.range;var T=E,j=eG(T,2);c=j[0],d=j[1]}var R=LI(O,o),N=R.realScaleType,V=R.scale;V.domain(A).range(E),BI(V);var q=FI(V,zn(zn({},O),{},{realScaleType:N})),L=zn(zn(zn({},O),q),{},{range:E,radius:S,realScaleType:N,scale:V,cx:p,cy:h,innerRadius:b,outerRadius:S,startAngle:c,endAngle:d});return zn(zn({},v),{},zI({},x,L))},{})},sG=function(t,r){var n=t.x,i=t.y,o=r.x,s=r.y;return Math.sqrt(Math.pow(n-o,2)+Math.pow(i-s,2))},lG=function(t,r){var n=t.x,i=t.y,o=r.cx,s=r.cy,u=sG({x:n,y:i},{x:o,y:s});if(u<=0)return{radius:u};var c=(n-o)/u,d=Math.acos(c);return i>s&&(d=2*Math.PI-d),{radius:u,angle:oG(d),angleInRadian:d}},uG=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),o=Math.floor(n/360),s=Math.min(i,o);return{startAngle:r-s*360,endAngle:n-s*360}},cG=function(t,r){var n=r.startAngle,i=r.endAngle,o=Math.floor(n/360),s=Math.floor(i/360),u=Math.min(o,s);return t+u*360},qk=function(t,r){var n=t.x,i=t.y,o=lG({x:n,y:i},r),s=o.radius,u=o.angle,c=r.innerRadius,d=r.outerRadius;if(sd)return!1;if(s===0)return!0;var p=uG(r),h=p.startAngle,y=p.endAngle,b=u,S;if(h<=y){for(;b>y;)b-=360;for(;b=h&&b<=y}else{for(;b>h;)b-=360;for(;b=y&&b<=h}return S?zn(zn({},r),{},{radius:s,angle:cG(b,r)}):null},WI=function(t){return!$.isValidElement(t)&&!De(t)&&typeof t!="boolean"?t.className:""};function Su(e){"@babel/helpers - typeof";return Su=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Su(e)}var fG=["offset"];function dG(e){return yG(e)||mG(e)||pG(e)||hG()}function hG(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pG(e,t){if(e){if(typeof e=="string")return ww(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ww(e,t)}}function mG(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yG(e){if(Array.isArray(e))return ww(e)}function ww(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function vG(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Uk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Dt(e){for(var t=1;t=0?1:-1,A,P;i==="insideStart"?(A=b+O*s,P=w):i==="insideEnd"?(A=S-O*s,P=!w):i==="end"&&(A=S+O*s,P=w),P=x<=0?P:!P;var E=ft(d,p,v,A),T=ft(d,p,v,A+(P?1:-1)*359),j="M".concat(E.x,",").concat(E.y,` A`).concat(v,",").concat(v,",0,1,").concat(P?0:1,`, `).concat(T.x,",").concat(T.y),R=Ue(t.id)?rc("recharts-radial-line-"):t.id;return H.createElement("text",Ou({},n,{dominantBaseline:"central",className:Be("recharts-radial-bar-label",u)}),H.createElement("defs",null,H.createElement("path",{id:R,d:j})),H.createElement("textPath",{xlinkHref:"#".concat(R)},r))},EG=function(t){var r=t.viewBox,n=t.offset,i=t.position,o=r,s=o.cx,u=o.cy,c=o.innerRadius,d=o.outerRadius,p=o.startAngle,h=o.endAngle,y=(p+h)/2;if(i==="outside"){var b=ft(s,u,d+n,y),S=b.x,w=b.y;return{x:S,y:w,textAnchor:S>=s?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:s,y:u,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:s,y:u,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:s,y:u,textAnchor:"middle",verticalAnchor:"end"};var v=(c+d)/2,x=ft(s,u,v,y),O=x.x,A=x.y;return{x:O,y:A,textAnchor:"middle",verticalAnchor:"middle"}},AG=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,o=t.position,s=r,u=s.x,c=s.y,d=s.width,p=s.height,h=p>=0?1:-1,y=h*i,b=h>0?"end":"start",S=h>0?"start":"end",w=d>=0?1:-1,v=w*i,x=w>0?"end":"start",O=w>0?"start":"end";if(o==="top"){var A={x:u+d/2,y:c-h*i,textAnchor:"middle",verticalAnchor:b};return Dt(Dt({},A),n?{height:Math.max(c-n.y,0),width:d}:{})}if(o==="bottom"){var P={x:u+d/2,y:c+p+y,textAnchor:"middle",verticalAnchor:S};return Dt(Dt({},P),n?{height:Math.max(n.y+n.height-(c+p),0),width:d}:{})}if(o==="left"){var E={x:u-v,y:c+p/2,textAnchor:x,verticalAnchor:"middle"};return Dt(Dt({},E),n?{width:Math.max(E.x-n.x,0),height:p}:{})}if(o==="right"){var T={x:u+d+v,y:c+p/2,textAnchor:O,verticalAnchor:"middle"};return Dt(Dt({},T),n?{width:Math.max(n.x+n.width-T.x,0),height:p}:{})}var j=n?{width:d,height:p}:{};return o==="insideLeft"?Dt({x:u+v,y:c+p/2,textAnchor:O,verticalAnchor:"middle"},j):o==="insideRight"?Dt({x:u+d-v,y:c+p/2,textAnchor:x,verticalAnchor:"middle"},j):o==="insideTop"?Dt({x:u+d/2,y:c+y,textAnchor:"middle",verticalAnchor:S},j):o==="insideBottom"?Dt({x:u+d/2,y:c+p-y,textAnchor:"middle",verticalAnchor:b},j):o==="insideTopLeft"?Dt({x:u+v,y:c+y,textAnchor:O,verticalAnchor:S},j):o==="insideTopRight"?Dt({x:u+d-v,y:c+y,textAnchor:x,verticalAnchor:S},j):o==="insideBottomLeft"?Dt({x:u+v,y:c+p-y,textAnchor:O,verticalAnchor:b},j):o==="insideBottomRight"?Dt({x:u+d-v,y:c+p-y,textAnchor:x,verticalAnchor:b},j):Rs(o)&&(fe(o.x)||Po(o.x))&&(fe(o.y)||Po(o.y))?Dt({x:u+dr(o.x,d),y:c+dr(o.y,p),textAnchor:"end",verticalAnchor:"end"},j):Dt({x:u+d/2,y:c+p/2,textAnchor:"middle",verticalAnchor:"middle"},j)},PG=function(t){return"cx"in t&&fe(t.cx)};function Wt(e){var t=e.offset,r=t===void 0?5:t,n=gG(e,fG),i=Dt({offset:r},n),o=i.viewBox,s=i.position,u=i.value,c=i.children,d=i.content,p=i.className,h=p===void 0?"":p,y=i.textBreakAll;if(!o||Ue(u)&&Ue(c)&&!$.isValidElement(d)&&!De(d))return null;if($.isValidElement(d))return $.cloneElement(d,i);var b;if(De(d)){if(b=$.createElement(d,i),$.isValidElement(b))return b}else b=_G(i);var S=PG(o),w=$e(i,!0);if(S&&(s==="insideStart"||s==="insideEnd"||s==="end"))return OG(i,b,w);var v=S?EG(i):AG(i);return H.createElement(Go,Ou({className:Be("recharts-label",h)},w,v,{breakAll:y}),b)}Wt.displayName="Label";var VI=function(t){var r=t.cx,n=t.cy,i=t.angle,o=t.startAngle,s=t.endAngle,u=t.r,c=t.radius,d=t.innerRadius,p=t.outerRadius,h=t.x,y=t.y,b=t.top,S=t.left,w=t.width,v=t.height,x=t.clockWise,O=t.labelViewBox;if(O)return O;if(fe(w)&&fe(v)){if(fe(h)&&fe(y))return{x:h,y,width:w,height:v};if(fe(b)&&fe(S))return{x:b,y:S,width:w,height:v}}return fe(h)&&fe(y)?{x:h,y,width:0,height:0}:fe(r)&&fe(n)?{cx:r,cy:n,startAngle:o||i||0,endAngle:s||i||0,innerRadius:d||0,outerRadius:p||c||u||0,clockWise:x}:t.viewBox?t.viewBox:{}},TG=function(t,r){return t?t===!0?H.createElement(Wt,{key:"label-implicit",viewBox:r}):Lt(t)?H.createElement(Wt,{key:"label-implicit",viewBox:r,value:t}):$.isValidElement(t)?t.type===Wt?$.cloneElement(t,{key:"label-implicit",viewBox:r}):H.createElement(Wt,{key:"label-implicit",content:t,viewBox:r}):De(t)?H.createElement(Wt,{key:"label-implicit",content:t,viewBox:r}):Rs(t)?H.createElement(Wt,Ou({viewBox:r},t,{key:"label-implicit"})):null:null},CG=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,o=VI(t),s=Gr(i,Wt).map(function(c,d){return $.cloneElement(c,{viewBox:r||o,key:"label-".concat(d)})});if(!n)return s;var u=TG(t.label,r||o);return[u].concat(dG(s))};Wt.parseViewBox=VI;Wt.renderCallByParent=CG;var j0,zk;function kG(){if(zk)return j0;zk=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return j0=e,j0}var jG=kG();const RG=tt(jG);function Eu(e){"@babel/helpers - typeof";return Eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eu(e)}var NG=["valueAccessor"],MG=["data","dataKey","clockWise","id","textBreakAll"];function IG(e){return BG(e)||LG(e)||DG(e)||$G()}function $G(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DG(e,t){if(e){if(typeof e=="string")return xw(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xw(e,t)}}function LG(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BG(e){if(Array.isArray(e))return xw(e)}function xw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zG(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var HG=function(t){return Array.isArray(t.value)?RG(t.value):t.value};function Vi(e){var t=e.valueAccessor,r=t===void 0?HG:t,n=Vk(e,NG),i=n.data,o=n.dataKey,s=n.clockWise,u=n.id,c=n.textBreakAll,d=Vk(n,MG);return!i||!i.length?null:H.createElement(et,{className:"recharts-label-list"},i.map(function(p,h){var y=Ue(o)?r(p,h):ar(p&&p.payload,o),b=Ue(u)?{}:{id:"".concat(u,"-").concat(h)};return H.createElement(Wt,$d({},$e(p,!0),d,b,{parentViewBox:p.parentViewBox,value:y,textBreakAll:c,viewBox:Wt.parseViewBox(Ue(s)?p:Wk(Wk({},p),{},{clockWise:s})),key:"label-".concat(h),index:h}))}))}Vi.displayName="LabelList";function WG(e,t){return e?e===!0?H.createElement(Vi,{key:"labelList-implicit",data:t}):H.isValidElement(e)||De(e)?H.createElement(Vi,{key:"labelList-implicit",data:t,content:e}):Rs(e)?H.createElement(Vi,$d({data:t},e,{key:"labelList-implicit"})):null:null}function VG(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=Gr(n,Vi).map(function(s,u){return $.cloneElement(s,{data:t,key:"labelList-".concat(u)})});if(!r)return i;var o=WG(e.label,t);return[o].concat(IG(i))}Vi.renderCallByParent=VG;function Au(e){"@babel/helpers - typeof";return Au=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Au(e)}function _w(){return _w=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(s>d),`, `).concat(h.x,",").concat(h.y,` `);if(i>0){var b=ft(r,n,i,s),S=ft(r,n,i,d);y+="L ".concat(S.x,",").concat(S.y,` A `).concat(i,",").concat(i,`,0, `).concat(+(Math.abs(c)>180),",").concat(+(s<=d),`, `).concat(b.x,",").concat(b.y," Z")}else y+="L ".concat(r,",").concat(n," Z");return y},QG=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,o=t.outerRadius,s=t.cornerRadius,u=t.forceCornerRadius,c=t.cornerIsExternal,d=t.startAngle,p=t.endAngle,h=fr(p-d),y=Lf({cx:r,cy:n,radius:o,angle:d,sign:h,cornerRadius:s,cornerIsExternal:c}),b=y.circleTangency,S=y.lineTangency,w=y.theta,v=Lf({cx:r,cy:n,radius:o,angle:p,sign:-h,cornerRadius:s,cornerIsExternal:c}),x=v.circleTangency,O=v.lineTangency,A=v.theta,P=c?Math.abs(d-p):Math.abs(d-p)-w-A;if(P<0)return u?"M ".concat(S.x,",").concat(S.y,` a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0 a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0 `):KI({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:d,endAngle:p});var E="M ".concat(S.x,",").concat(S.y,` A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(b.x,",").concat(b.y,` A`).concat(o,",").concat(o,",0,").concat(+(P>180),",").concat(+(h<0),",").concat(x.x,",").concat(x.y,` A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(O.x,",").concat(O.y,` `);if(i>0){var T=Lf({cx:r,cy:n,radius:i,angle:d,sign:h,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),j=T.circleTangency,R=T.lineTangency,N=T.theta,V=Lf({cx:r,cy:n,radius:i,angle:p,sign:-h,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),q=V.circleTangency,L=V.lineTangency,K=V.theta,Y=c?Math.abs(d-p):Math.abs(d-p)-N-K;if(Y<0&&s===0)return"".concat(E,"L").concat(r,",").concat(n,"Z");E+="L".concat(L.x,",").concat(L.y,` A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(q.x,",").concat(q.y,` A`).concat(i,",").concat(i,",0,").concat(+(Y>180),",").concat(+(h>0),",").concat(j.x,",").concat(j.y,` A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(R.x,",").concat(R.y,"Z")}else E+="L".concat(r,",").concat(n,"Z");return E},JG={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},XI=function(t){var r=Xk(Xk({},JG),t),n=r.cx,i=r.cy,o=r.innerRadius,s=r.outerRadius,u=r.cornerRadius,c=r.forceCornerRadius,d=r.cornerIsExternal,p=r.startAngle,h=r.endAngle,y=r.className;if(s0&&Math.abs(p-h)<360?v=QG({cx:n,cy:i,innerRadius:o,outerRadius:s,cornerRadius:Math.min(w,S/2),forceCornerRadius:c,cornerIsExternal:d,startAngle:p,endAngle:h}):v=KI({cx:n,cy:i,innerRadius:o,outerRadius:s,startAngle:p,endAngle:h}),H.createElement("path",_w({},$e(r,!0),{className:b,d:v,role:"img"}))};function Pu(e){"@babel/helpers - typeof";return Pu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pu(e)}function Sw(){return Sw=Object.assign?Object.assign.bind():function(e){for(var t=1;tcY.call(e,t));function ia(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const hY="__v",pY="__o",mY="_owner",{getOwnPropertyDescriptor:rj,keys:nj}=Object;function yY(e,t){return e.byteLength===t.byteLength&&Dd(new Uint8Array(e),new Uint8Array(t))}function gY(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function vY(e,t){return e.byteLength===t.byteLength&&Dd(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function bY(e,t){return ia(e.getTime(),t.getTime())}function wY(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function xY(e,t){return e===t}function ij(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),o=e.entries();let s,u,c=0;for(;(s=o.next())&&!s.done;){const d=t.entries();let p=!1,h=0;for(;(u=d.next())&&!u.done;){if(i[h]){h++;continue}const y=s.value,b=u.value;if(r.equals(y[0],b[0],c,h,e,t,r)&&r.equals(y[1],b[1],y[0],b[0],e,t,r)){p=i[h]=!0;break}h++}if(!p)return!1;c++}return!0}const _Y=ia;function SY(e,t,r){const n=nj(e);let i=n.length;if(nj(t).length!==i)return!1;for(;i-- >0;)if(!GI(e,t,r,n[i]))return!1;return!0}function Dl(e,t,r){const n=tj(e);let i=n.length;if(tj(t).length!==i)return!1;let o,s,u;for(;i-- >0;)if(o=n[i],!GI(e,t,r,o)||(s=rj(e,o),u=rj(t,o),(s||u)&&(!s||!u||s.configurable!==u.configurable||s.enumerable!==u.enumerable||s.writable!==u.writable)))return!1;return!0}function OY(e,t){return ia(e.valueOf(),t.valueOf())}function EY(e,t){return e.source===t.source&&e.flags===t.flags}function oj(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),o=e.values();let s,u;for(;(s=o.next())&&!s.done;){const c=t.values();let d=!1,p=0;for(;(u=c.next())&&!u.done;){if(!i[p]&&r.equals(s.value,u.value,s.value,u.value,e,t,r)){d=i[p]=!0;break}p++}if(!d)return!1}return!0}function Dd(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function AY(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function GI(e,t,r,n){return(n===mY||n===pY||n===hY)&&(e.$$typeof||t.$$typeof)?!0:dY(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const PY="[object ArrayBuffer]",TY="[object Arguments]",CY="[object Boolean]",kY="[object DataView]",jY="[object Date]",RY="[object Error]",NY="[object Map]",MY="[object Number]",IY="[object Object]",$Y="[object RegExp]",DY="[object Set]",LY="[object String]",BY={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},FY="[object URL]",qY=Object.prototype.toString;function UY({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:o,areMapsEqual:s,areNumbersEqual:u,areObjectsEqual:c,arePrimitiveWrappersEqual:d,areRegExpsEqual:p,areSetsEqual:h,areTypedArraysEqual:y,areUrlsEqual:b,unknownTagComparators:S}){return function(v,x,O){if(v===x)return!0;if(v==null||x==null)return!1;const A=typeof v;if(A!==typeof x)return!1;if(A!=="object")return A==="number"?u(v,x,O):A==="function"?o(v,x,O):!1;const P=v.constructor;if(P!==x.constructor)return!1;if(P===Object)return c(v,x,O);if(Array.isArray(v))return t(v,x,O);if(P===Date)return n(v,x,O);if(P===RegExp)return p(v,x,O);if(P===Map)return s(v,x,O);if(P===Set)return h(v,x,O);const E=qY.call(v);if(E===jY)return n(v,x,O);if(E===$Y)return p(v,x,O);if(E===NY)return s(v,x,O);if(E===DY)return h(v,x,O);if(E===IY)return typeof v.then!="function"&&typeof x.then!="function"&&c(v,x,O);if(E===FY)return b(v,x,O);if(E===RY)return i(v,x,O);if(E===TY)return c(v,x,O);if(BY[E])return y(v,x,O);if(E===PY)return e(v,x,O);if(E===kY)return r(v,x,O);if(E===CY||E===MY||E===LY)return d(v,x,O);if(S){let T=S[E];if(!T){const j=fY(v);j&&(T=S[j])}if(T)return T(v,x,O)}return!1}}function zY({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:yY,areArraysEqual:r?Dl:gY,areDataViewsEqual:vY,areDatesEqual:bY,areErrorsEqual:wY,areFunctionsEqual:xY,areMapsEqual:r?I0(ij,Dl):ij,areNumbersEqual:_Y,areObjectsEqual:r?Dl:SY,arePrimitiveWrappersEqual:OY,areRegExpsEqual:EY,areSetsEqual:r?I0(oj,Dl):oj,areTypedArraysEqual:r?I0(Dd,Dl):Dd,areUrlsEqual:AY,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const i=Ff(n.areArraysEqual),o=Ff(n.areMapsEqual),s=Ff(n.areObjectsEqual),u=Ff(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:u})}return n}function HY(e){return function(t,r,n,i,o,s,u){return e(t,r,u)}}function WY({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(u,c){const{cache:d=e?new WeakMap:void 0,meta:p}=r();return t(u,c,{cache:d,equals:n,meta:p,strict:i})};if(e)return function(u,c){return t(u,c,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const o={cache:void 0,equals:n,meta:void 0,strict:i};return function(u,c){return t(u,c,o)}}const VY=Zi();Zi({strict:!0});Zi({circular:!0});Zi({circular:!0,strict:!0});Zi({createInternalComparator:()=>ia});Zi({strict:!0,createInternalComparator:()=>ia});Zi({circular:!0,createInternalComparator:()=>ia});Zi({circular:!0,createInternalComparator:()=>ia,strict:!0});function Zi(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,o=zY(e),s=UY(o),u=r?r(s):HY(s);return WY({circular:t,comparator:s,createState:n,equals:u,strict:i})}function KY(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function aj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(o){r<0&&(r=o),o-r>t?(e(o),r=-1):KY(i)};requestAnimationFrame(n)}function Ew(e){"@babel/helpers - typeof";return Ew=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ew(e)}function XY(e){return JY(e)||QY(e)||YY(e)||GY()}function GY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YY(e,t){if(e){if(typeof e=="string")return sj(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sj(e,t)}}function sj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?1:x<0?0:x},w=function(x){for(var O=x>1?1:x,A=O,P=0;P<8;++P){var E=h(A)-O,T=b(A);if(Math.abs(E-O)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,o=i===void 0?8:i,s=t.dt,u=s===void 0?17:s,c=function(p,h,y){var b=-(p-h)*n,S=y*o,w=y+(b-S)*u/1e3,v=y*u/1e3+p;return Math.abs(v-h)e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function CQ(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o=0)&&(r[i]=e[i]);return r}function $0(e){return NQ(e)||RQ(e)||jQ(e)||kQ()}function kQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jQ(e,t){if(e){if(typeof e=="string")return kw(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kw(e,t)}}function RQ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function NQ(e){if(Array.isArray(e))return kw(e)}function kw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Fd(e){return Fd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Fd(e)}var ti=(function(e){LQ(r,e);var t=BQ(r);function r(n,i){var o;MQ(this,r),o=t.call(this,n,i);var s=o.props,u=s.isActive,c=s.attributeName,d=s.from,p=s.to,h=s.steps,y=s.children,b=s.duration;if(o.handleStyleChange=o.handleStyleChange.bind(Nw(o)),o.changeStyle=o.changeStyle.bind(Nw(o)),!u||b<=0)return o.state={style:{}},typeof y=="function"&&(o.state={style:p}),Rw(o);if(h&&h.length)o.state={style:h[0].style};else if(d){if(typeof y=="function")return o.state={style:d},Rw(o);o.state={style:c?Wl({},c,d):d}}else o.state={style:{}};return o}return $Q(r,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,s=i.canBegin;this.mounted=!0,!(!o||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,s=o.isActive,u=o.canBegin,c=o.attributeName,d=o.shouldReAnimate,p=o.to,h=o.from,y=this.state.style;if(u){if(!s){var b={style:c?Wl({},c,p):p};this.state&&y&&(c&&y[c]!==p||!c&&y!==p)&&this.setState(b);return}if(!(VY(i.to,p)&&i.canBegin&&i.isActive)){var S=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var w=S||d?h:i.to;if(this.state&&y){var v={style:c?Wl({},c,w):w};(c&&y[c]!==w||!c&&y!==w)&&this.setState(v)}this.runAnimation(ln(ln({},this.props),{},{from:w,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var o=this,s=i.from,u=i.to,c=i.duration,d=i.easing,p=i.begin,h=i.onAnimationEnd,y=i.onAnimationStart,b=AQ(s,u,mQ(d),c,this.changeStyle),S=function(){o.stopJSAnimation=b()};this.manager.start([y,p,S,c,h])}},{key:"runStepAnimation",value:function(i){var o=this,s=i.steps,u=i.begin,c=i.onAnimationStart,d=s[0],p=d.style,h=d.duration,y=h===void 0?0:h,b=function(w,v,x){if(x===0)return w;var O=v.duration,A=v.easing,P=A===void 0?"ease":A,E=v.style,T=v.properties,j=v.onAnimationEnd,R=x>0?s[x-1]:v,N=T||Object.keys(E);if(typeof P=="function"||P==="spring")return[].concat($0(w),[o.runJSAnimation.bind(o,{from:R.style,to:E,duration:O,easing:P}),O]);var V=cj(N,O,P),q=ln(ln(ln({},R.style),E),{},{transition:V});return[].concat($0(w),[q,O,j]).filter(nQ)};return this.manager.start([c].concat($0(s.reduce(b,[p,Math.max(y,u)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=ZY());var o=i.begin,s=i.duration,u=i.attributeName,c=i.to,d=i.easing,p=i.onAnimationStart,h=i.onAnimationEnd,y=i.steps,b=i.children,S=this.manager;if(this.unSubscribe=S.subscribe(this.handleStyleChange),typeof d=="function"||typeof b=="function"||d==="spring"){this.runJSAnimation(i);return}if(y.length>1){this.runStepAnimation(i);return}var w=u?Wl({},u,c):c,v=cj(Object.keys(w),s,d);S.start([p,o,ln(ln({},w),{},{transition:v}),s,h])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var s=i.duration;i.attributeName,i.easing;var u=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=TQ(i,PQ),d=$.Children.count(o),p=this.state.style;if(typeof o=="function")return o(p);if(!u||d===0||s<=0)return o;var h=function(b){var S=b.props,w=S.style,v=w===void 0?{}:w,x=S.className,O=$.cloneElement(b,ln(ln({},c),{},{style:ln(ln({},v),p),className:x}));return O};return d===1?h($.Children.only(o)):H.createElement("div",null,$.Children.map(o,function(y){return h(y)}))}}]),r})($.PureComponent);ti.displayName="Animate";ti.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};ti.propTypes={from:Ye.oneOfType([Ye.object,Ye.string]),to:Ye.oneOfType([Ye.object,Ye.string]),attributeName:Ye.string,duration:Ye.number,begin:Ye.number,easing:Ye.oneOfType([Ye.string,Ye.func]),steps:Ye.arrayOf(Ye.shape({duration:Ye.number.isRequired,style:Ye.object.isRequired,easing:Ye.oneOfType([Ye.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Ye.func]),properties:Ye.arrayOf("string"),onAnimationEnd:Ye.func})),children:Ye.oneOfType([Ye.node,Ye.func]),isActive:Ye.bool,canBegin:Ye.bool,onAnimationEnd:Ye.func,shouldReAnimate:Ye.bool,onAnimationStart:Ye.func,onAnimationReStart:Ye.func};function ku(e){"@babel/helpers - typeof";return ku=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ku(e)}function qd(){return qd=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0?1:-1,c=n>=0?1:-1,d=i>=0&&n>=0||i<0&&n<0?1:0,p;if(s>0&&o instanceof Array){for(var h=[0,0,0,0],y=0,b=4;ys?s:o[y];p="M".concat(t,",").concat(r+u*h[0]),h[0]>0&&(p+="A ".concat(h[0],",").concat(h[0],",0,0,").concat(d,",").concat(t+c*h[0],",").concat(r)),p+="L ".concat(t+n-c*h[1],",").concat(r),h[1]>0&&(p+="A ".concat(h[1],",").concat(h[1],",0,0,").concat(d,`, `).concat(t+n,",").concat(r+u*h[1])),p+="L ".concat(t+n,",").concat(r+i-u*h[2]),h[2]>0&&(p+="A ".concat(h[2],",").concat(h[2],",0,0,").concat(d,`, `).concat(t+n-c*h[2],",").concat(r+i)),p+="L ".concat(t+c*h[3],",").concat(r+i),h[3]>0&&(p+="A ".concat(h[3],",").concat(h[3],",0,0,").concat(d,`, `).concat(t,",").concat(r+i-u*h[3])),p+="Z"}else if(s>0&&o===+o&&o>0){var S=Math.min(s,o);p="M ".concat(t,",").concat(r+u*S,` A `).concat(S,",").concat(S,",0,0,").concat(d,",").concat(t+c*S,",").concat(r,` L `).concat(t+n-c*S,",").concat(r,` A `).concat(S,",").concat(S,",0,0,").concat(d,",").concat(t+n,",").concat(r+u*S,` L `).concat(t+n,",").concat(r+i-u*S,` A `).concat(S,",").concat(S,",0,0,").concat(d,",").concat(t+n-c*S,",").concat(r+i,` L `).concat(t+c*S,",").concat(r+i,` A `).concat(S,",").concat(S,",0,0,").concat(d,",").concat(t,",").concat(r+i-u*S," Z")}else p="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return p},GQ=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,o=r.x,s=r.y,u=r.width,c=r.height;if(Math.abs(u)>0&&Math.abs(c)>0){var d=Math.min(o,o+u),p=Math.max(o,o+u),h=Math.min(s,s+c),y=Math.max(s,s+c);return n>=d&&n<=p&&i>=h&&i<=y}return!1},YQ={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},_1=function(t){var r=vj(vj({},YQ),t),n=$.useRef(),i=$.useState(-1),o=qQ(i,2),s=o[0],u=o[1];$.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var P=n.current.getTotalLength();P&&u(P)}catch{}},[]);var c=r.x,d=r.y,p=r.width,h=r.height,y=r.radius,b=r.className,S=r.animationEasing,w=r.animationDuration,v=r.animationBegin,x=r.isAnimationActive,O=r.isUpdateAnimationActive;if(c!==+c||d!==+d||p!==+p||h!==+h||p===0||h===0)return null;var A=Be("recharts-rectangle",b);return O?H.createElement(ti,{canBegin:s>0,from:{width:p,height:h,x:c,y:d},to:{width:p,height:h,x:c,y:d},duration:w,animationEasing:S,isActive:O},function(P){var E=P.width,T=P.height,j=P.x,R=P.y;return H.createElement(ti,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:w,isActive:x,easing:S},H.createElement("path",qd({},$e(r,!0),{className:A,d:bj(j,R,E,T,y),ref:n})))}):H.createElement("path",qd({},$e(r,!0),{className:A,d:bj(c,d,p,h,y)}))},QQ=["points","className","baseLinePoints","connectNulls"];function $a(){return $a=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ZQ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function wj(e){return nJ(e)||rJ(e)||tJ(e)||eJ()}function eJ(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tJ(e,t){if(e){if(typeof e=="string")return Mw(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Mw(e,t)}}function rJ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nJ(e){if(Array.isArray(e))return Mw(e)}function Mw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){xj(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),xj(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},Jl=function(t,r){var n=iJ(t);r&&(n=[n.reduce(function(o,s){return[].concat(wj(o),wj(s))},[])]);var i=n.map(function(o){return o.reduce(function(s,u,c){return"".concat(s).concat(c===0?"M":"L").concat(u.x,",").concat(u.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},oJ=function(t,r,n){var i=Jl(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Jl(r.reverse(),n).slice(1))},aJ=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,o=t.connectNulls,s=JQ(t,QQ);if(!r||!r.length)return null;var u=Be("recharts-polygon",n);if(i&&i.length){var c=s.stroke&&s.stroke!=="none",d=oJ(r,i,o);return H.createElement("g",{className:u},H.createElement("path",$a({},$e(s,!0),{fill:d.slice(-1)==="Z"?s.fill:"none",stroke:"none",d})),c?H.createElement("path",$a({},$e(s,!0),{fill:"none",d:Jl(r,o)})):null,c?H.createElement("path",$a({},$e(s,!0),{fill:"none",d:Jl(i,o)})):null)}var p=Jl(r,o);return H.createElement("path",$a({},$e(s,!0),{fill:p.slice(-1)==="Z"?s.fill:"none",className:u,d:p}))};function Iw(){return Iw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function hJ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var pJ=function(t,r,n,i,o,s){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(s,",").concat(r,"h").concat(n)},mJ=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,o=i===void 0?0:i,s=t.top,u=s===void 0?0:s,c=t.left,d=c===void 0?0:c,p=t.width,h=p===void 0?0:p,y=t.height,b=y===void 0?0:y,S=t.className,w=dJ(t,sJ),v=lJ({x:n,y:o,top:u,left:d,width:h,height:b},w);return!fe(n)||!fe(o)||!fe(h)||!fe(b)||!fe(u)||!fe(d)?null:H.createElement("path",$w({},$e(v,!0),{className:Be("recharts-cross",S),d:pJ(n,o,h,b,u,d)}))},D0,Sj;function yJ(){if(Sj)return D0;Sj=1;var e=Ch(),t=gI(),r=jn();function n(i,o){return i&&i.length?e(i,r(o,2),t):void 0}return D0=n,D0}var gJ=yJ();const vJ=tt(gJ);var L0,Oj;function bJ(){if(Oj)return L0;Oj=1;var e=Ch(),t=jn(),r=vI();function n(i,o){return i&&i.length?e(i,t(o,2),r):void 0}return L0=n,L0}var wJ=bJ();const xJ=tt(wJ);var _J=["cx","cy","angle","ticks","axisLine"],SJ=["ticks","tick","angle","tickFormatter","stroke"];function ds(e){"@babel/helpers - typeof";return ds=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ds(e)}function Zl(){return Zl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function OJ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function EJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pj(e,t){for(var r=0;rkj?s=i==="outer"?"start":"end":o<-kj?s=i==="outer"?"end":"start":s="middle",s}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,o=n.cy,s=n.radius,u=n.axisLine,c=n.axisLineType,d=bo(bo({},$e(this.props,!1)),{},{fill:"none"},$e(u,!1));if(c==="circle")return H.createElement(S1,So({className:"recharts-polar-angle-axis-line"},d,{cx:i,cy:o,r:s}));var p=this.props.ticks,h=p.map(function(y){return ft(i,o,s,y.coordinate)});return H.createElement(aJ,So({className:"recharts-polar-angle-axis-line"},d,{points:h}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,o=i.ticks,s=i.tick,u=i.tickLine,c=i.tickFormatter,d=i.stroke,p=$e(this.props,!1),h=$e(s,!1),y=bo(bo({},p),{},{fill:"none"},$e(u,!1)),b=o.map(function(S,w){var v=n.getTickLineCoord(S),x=n.getTickTextAnchor(S),O=bo(bo(bo({textAnchor:x},p),{},{stroke:"none",fill:d},h),{},{index:w,payload:S,x:v.x2,y:v.y2});return H.createElement(et,So({className:Be("recharts-polar-angle-axis-tick",WI(s)),key:"tick-".concat(S.coordinate)},Xo(n.props,S,w)),u&&H.createElement("line",So({className:"recharts-polar-angle-axis-tick-line"},y,v)),s&&t.renderTickItem(s,O,c?c(S.value,w):S.value))});return H.createElement(et,{className:"recharts-polar-angle-axis-ticks"},b)}},{key:"render",value:function(){var n=this.props,i=n.ticks,o=n.radius,s=n.axisLine;return o<=0||!i||!i.length?null:H.createElement(et,{className:Be("recharts-polar-angle-axis",this.props.className)},s&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,o){var s;return H.isValidElement(n)?s=H.cloneElement(n,i):De(n)?s=n(i):s=H.createElement(Go,So({},i,{className:"recharts-polar-angle-axis-tick-value"}),o),s}}])})($.PureComponent);Lh(Bh,"displayName","PolarAngleAxis");Lh(Bh,"axisType","angleAxis");Lh(Bh,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var B0,jj;function FJ(){if(jj)return B0;jj=1;var e=gM(),t=e(Object.getPrototypeOf,Object);return B0=t,B0}var F0,Rj;function qJ(){if(Rj)return F0;Rj=1;var e=ri(),t=FJ(),r=ni(),n="[object Object]",i=Function.prototype,o=Object.prototype,s=i.toString,u=o.hasOwnProperty,c=s.call(Object);function d(p){if(!r(p)||e(p)!=n)return!1;var h=t(p);if(h===null)return!0;var y=u.call(h,"constructor")&&h.constructor;return typeof y=="function"&&y instanceof y&&s.call(y)==c}return F0=d,F0}var UJ=qJ();const zJ=tt(UJ);var q0,Nj;function HJ(){if(Nj)return q0;Nj=1;var e=ri(),t=ni(),r="[object Boolean]";function n(i){return i===!0||i===!1||t(i)&&e(i)==r}return q0=n,q0}var WJ=HJ();const VJ=tt(WJ);function Ru(e){"@babel/helpers - typeof";return Ru=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ru(e)}function Hd(){return Hd=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0,from:{upperWidth:0,lowerWidth:0,height:y,x:c,y:d},to:{upperWidth:p,lowerWidth:h,height:y,x:c,y:d},duration:w,animationEasing:S,isActive:x},function(A){var P=A.upperWidth,E=A.lowerWidth,T=A.height,j=A.x,R=A.y;return H.createElement(ti,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:w,easing:S},H.createElement("path",Hd({},$e(r,!0),{className:O,d:Dj(j,R,P,E,T),ref:n})))}):H.createElement("g",null,H.createElement("path",Hd({},$e(r,!0),{className:O,d:Dj(c,d,p,h,y)})))},nZ=["option","shapeType","propTransformer","activeClassName","isActive"];function Nu(e){"@babel/helpers - typeof";return Nu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nu(e)}function iZ(e,t){if(e==null)return{};var r=oZ(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function oZ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Lj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Wd(e){for(var t=1;t0?Nr(A,"paddingAngle",0):0;if(E){var j=Ci(E.endAngle-E.startAngle,A.endAngle-A.startAngle),R=ut(ut({},A),{},{startAngle:O+T,endAngle:O+j(w)+T});v.push(R),O=R.endAngle}else{var N=A.endAngle,V=A.startAngle,q=Ci(0,N-V),L=q(w),K=ut(ut({},A),{},{startAngle:O+T,endAngle:O+L+T});v.push(K),O=K.endAngle}}),H.createElement(et,null,n.renderSectorsStatically(v))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(o){if(!o.altKey)switch(o.key){case"ArrowLeft":{var s=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"ArrowRight":{var u=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[u].focus(),i.setState({sectorToFocus:u});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,o=n.isAnimationActive,s=this.state.prevSectors;return o&&i&&i.length&&(!s||!Rh(s,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,o=i.hide,s=i.sectors,u=i.className,c=i.label,d=i.cx,p=i.cy,h=i.innerRadius,y=i.outerRadius,b=i.isAnimationActive,S=this.state.isAnimationFinished;if(o||!s||!s.length||!fe(d)||!fe(p)||!fe(h)||!fe(y))return null;var w=Be("recharts-pie",u);return H.createElement(et,{tabIndex:this.props.rootTabIndex,className:w,ref:function(x){n.pieRef=x}},this.renderSectors(),c&&this.renderLabels(s),Wt.renderCallByParent(this.props,null,!1),(!b||S)&&Vi.renderCallByParent(this.props,s,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n=360?O:O-1)*c,P=v-O*b-A,E=i.reduce(function(R,N){var V=ar(N,x,0);return R+(fe(V)?V:0)},0),T;if(E>0){var j;T=i.map(function(R,N){var V=ar(R,x,0),q=ar(R,p,N),L=(fe(V)?V:0)/E,K;N?K=j.endAngle+fr(w)*c*(V!==0?1:0):K=s;var Y=K+fr(w)*((V!==0?b:0)+L*P),Q=(K+Y)/2,Z=(S.innerRadius+S.outerRadius)/2,te=[{name:q,value:V,payload:R,dataKey:x,type:y}],G=ft(S.cx,S.cy,Z,Q);return j=ut(ut(ut({percent:L,cornerRadius:o,name:q,tooltipPayload:te,midAngle:Q,middleRadius:Z,tooltipPosition:G},R),S),{},{value:ar(R,x),startAngle:K,endAngle:Y,payload:R,paddingAngle:fr(w)*c}),j})}return ut(ut({},S),{},{sectors:T,data:i})});var U0,Uj;function AZ(){if(Uj)return U0;Uj=1;var e=Math.ceil,t=Math.max;function r(n,i,o,s){for(var u=-1,c=t(e((i-n)/(o||1)),0),d=Array(c);c--;)d[s?c:++u]=n,n+=o;return d}return U0=r,U0}var z0,zj;function u$(){if(zj)return z0;zj=1;var e=NM(),t=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var o=i<0?-1:1;return o*r}return i===i?i:0}return z0=n,z0}var H0,Hj;function PZ(){if(Hj)return H0;Hj=1;var e=AZ(),t=_h(),r=u$();function n(i){return function(o,s,u){return u&&typeof u!="number"&&t(o,s,u)&&(s=u=void 0),o=r(o),s===void 0?(s=o,o=0):s=r(s),u=u===void 0?o0&&n.handleDrag(i.changedTouches[0])}),kr(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,o=i.endIndex,s=i.onDragEnd,u=i.startIndex;s==null||s({endIndex:o,startIndex:u})}),n.detachDragEndListener()}),kr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),kr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),kr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),kr(n,"handleSlideDragStart",function(i){var o=Yj(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return BZ(t,e),IZ(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,o=n.endX,s=this.state.scaleValues,u=this.props,c=u.gap,d=u.data,p=d.length-1,h=Math.min(i,o),y=Math.max(i,o),b=t.getIndexInRange(s,h),S=t.getIndexInRange(s,y);return{startIndex:b-b%c,endIndex:S===p?p:S-S%c}}},{key:"getTextOfTick",value:function(n){var i=this.props,o=i.data,s=i.tickFormatter,u=i.dataKey,c=ar(o[n],u,n);return De(s)?s(c,n):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var i=this.state,o=i.slideMoveStartX,s=i.startX,u=i.endX,c=this.props,d=c.x,p=c.width,h=c.travellerWidth,y=c.startIndex,b=c.endIndex,S=c.onChange,w=n.pageX-o;w>0?w=Math.min(w,d+p-h-u,d+p-h-s):w<0&&(w=Math.max(w,d-s,d-u));var v=this.getIndex({startX:s+w,endX:u+w});(v.startIndex!==y||v.endIndex!==b)&&S&&S(v),this.setState({startX:s+w,endX:u+w,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var o=Yj(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,o=i.brushMoveStartX,s=i.movingTravellerId,u=i.endX,c=i.startX,d=this.state[s],p=this.props,h=p.x,y=p.width,b=p.travellerWidth,S=p.onChange,w=p.gap,v=p.data,x={startX:this.state.startX,endX:this.state.endX},O=n.pageX-o;O>0?O=Math.min(O,h+y-b-d):O<0&&(O=Math.max(O,h-d)),x[s]=d+O;var A=this.getIndex(x),P=A.startIndex,E=A.endIndex,T=function(){var R=v.length-1;return s==="startX"&&(u>c?P%w===0:E%w===0)||uc?E%w===0:P%w===0)||u>c&&E===R};this.setState(kr(kr({},s,d+O),"brushMoveStartX",n.pageX),function(){S&&T()&&S(A)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var o=this,s=this.state,u=s.scaleValues,c=s.startX,d=s.endX,p=this.state[i],h=u.indexOf(p);if(h!==-1){var y=h+n;if(!(y===-1||y>=u.length)){var b=u[y];i==="startX"&&b>=d||i==="endX"&&b<=c||this.setState(kr({},i,b),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,o=n.y,s=n.width,u=n.height,c=n.fill,d=n.stroke;return H.createElement("rect",{stroke:d,fill:c,x:i,y:o,width:s,height:u})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,o=n.y,s=n.width,u=n.height,c=n.data,d=n.children,p=n.padding,h=$.Children.only(d);return h?H.cloneElement(h,{x:i,y:o,width:s,height:u,margin:p,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(n,i){var o,s,u=this,c=this.props,d=c.y,p=c.travellerWidth,h=c.height,y=c.traveller,b=c.ariaLabel,S=c.data,w=c.startIndex,v=c.endIndex,x=Math.max(n,this.props.x),O=V0(V0({},$e(this.props,!1)),{},{x,y:d,width:p,height:h}),A=b||"Min value: ".concat((o=S[w])===null||o===void 0?void 0:o.name,", Max value: ").concat((s=S[v])===null||s===void 0?void 0:s.name);return H.createElement(et,{tabIndex:0,role:"slider","aria-label":A,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),u.handleTravellerMoveKeyboard(E.key==="ArrowRight"?1:-1,i))},onFocus:function(){u.setState({isTravellerFocused:!0})},onBlur:function(){u.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(y,O))}},{key:"renderSlide",value:function(n,i){var o=this.props,s=o.y,u=o.height,c=o.stroke,d=o.travellerWidth,p=Math.min(n,i)+d,h=Math.max(Math.abs(i-n)-d,0);return H.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:p,y:s,width:h,height:u})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,o=n.endIndex,s=n.y,u=n.height,c=n.travellerWidth,d=n.stroke,p=this.state,h=p.startX,y=p.endX,b=5,S={pointerEvents:"none",fill:d};return H.createElement(et,{className:"recharts-brush-texts"},H.createElement(Go,Xd({textAnchor:"end",verticalAnchor:"middle",x:Math.min(h,y)-b,y:s+u/2},S),this.getTextOfTick(i)),H.createElement(Go,Xd({textAnchor:"start",verticalAnchor:"middle",x:Math.max(h,y)+c+b,y:s+u/2},S),this.getTextOfTick(o)))}},{key:"render",value:function(){var n=this.props,i=n.data,o=n.className,s=n.children,u=n.x,c=n.y,d=n.width,p=n.height,h=n.alwaysShowText,y=this.state,b=y.startX,S=y.endX,w=y.isTextActive,v=y.isSlideMoving,x=y.isTravellerMoving,O=y.isTravellerFocused;if(!i||!i.length||!fe(u)||!fe(c)||!fe(d)||!fe(p)||d<=0||p<=0)return null;var A=Be("recharts-brush",o),P=H.Children.count(s)===1,E=NZ("userSelect","none");return H.createElement(et,{className:A,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),P&&this.renderPanorama(),this.renderSlide(b,S),this.renderTravellerLayer(b,"startX"),this.renderTravellerLayer(S,"endX"),(w||v||x||O||h)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,o=n.y,s=n.width,u=n.height,c=n.stroke,d=Math.floor(o+u/2)-1;return H.createElement(H.Fragment,null,H.createElement("rect",{x:i,y:o,width:s,height:u,fill:c,stroke:"none"}),H.createElement("line",{x1:i+1,y1:d,x2:i+s-1,y2:d,fill:"none",stroke:"#fff"}),H.createElement("line",{x1:i+1,y1:d+2,x2:i+s-1,y2:d+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var o;return H.isValidElement(n)?o=H.cloneElement(n,i):De(n)?o=n(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(n,i){var o=n.data,s=n.width,u=n.x,c=n.travellerWidth,d=n.updateId,p=n.startIndex,h=n.endIndex;if(o!==i.prevData||d!==i.prevUpdateId)return V0({prevData:o,prevTravellerWidth:c,prevUpdateId:d,prevX:u,prevWidth:s},o&&o.length?qZ({data:o,width:s,x:u,travellerWidth:c,startIndex:p,endIndex:h}):{scale:null,scaleValues:null});if(i.scale&&(s!==i.prevWidth||u!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([u,u+s-c]);var y=i.scale.domain().map(function(b){return i.scale(b)});return{prevData:o,prevTravellerWidth:c,prevUpdateId:d,prevX:u,prevWidth:s,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:y}}return null}},{key:"getIndexInRange",value:function(n,i){for(var o=n.length,s=0,u=o-1;u-s>1;){var c=Math.floor((s+u)/2);n[c]>i?u=c:s=c}return i>=n[u]?u:s}}])})($.PureComponent);kr(ys,"displayName","Brush");kr(ys,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var K0,Qj;function UZ(){if(Qj)return K0;Qj=1;var e=Xx();function t(r,n){var i;return e(r,function(o,s,u){return i=n(o,s,u),!i}),!!i}return K0=t,K0}var X0,Jj;function zZ(){if(Jj)return X0;Jj=1;var e=cM(),t=jn(),r=UZ(),n=Er(),i=_h();function o(s,u,c){var d=n(s)?e:r;return c&&i(s,u,c)&&(u=void 0),d(s,t(u,3))}return X0=o,X0}var HZ=zZ();const WZ=tt(HZ);var Pn=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},G0,Zj;function VZ(){if(Zj)return G0;Zj=1;var e=TM();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return G0=t,G0}var Y0,e2;function KZ(){if(e2)return Y0;e2=1;var e=VZ(),t=AM(),r=jn();function n(i,o){var s={};return o=r(o,3),t(i,function(u,c,d){e(s,c,o(u,c,d))}),s}return Y0=n,Y0}var XZ=KZ();const GZ=tt(XZ);var Q0,t2;function YZ(){if(t2)return Q0;t2=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function aee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function see(e,t){var r=e.x,n=e.y,i=oee(e,tee),o="".concat(r),s=parseInt(o,10),u="".concat(n),c=parseInt(u,10),d="".concat(t.height||i.height),p=parseInt(d,10),h="".concat(t.width||i.width),y=parseInt(h,10);return Ll(Ll(Ll(Ll(Ll({},t),i),s?{x:s}:{}),c?{y:c}:{}),{},{height:p,width:y,name:t.name,radius:t.radius})}function o2(e){return H.createElement(a$,qw({shapeType:"rectangle",propTransformer:see,activeClassName:"recharts-active-bar"},e))}var lee=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var o=fe(n)||TU(n);return o?t(n,i):(o||Qo(),r)}},uee=["value","background"],h$;function gs(e){"@babel/helpers - typeof";return gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gs(e)}function cee(e,t){if(e==null)return{};var r=fee(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Yd(){return Yd=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(Q)0&&Math.abs(Y)0&&(K=Math.min((pe||0)-(Y[he-1]||0),K))}),Number.isFinite(K)){var Q=K/L,Z=w.layout==="vertical"?n.height:n.width;if(w.padding==="gap"&&(j=Q*Z/2),w.padding==="no-gap"){var te=dr(t.barCategoryGap,Q*Z),G=Q*Z/2;j=G-te-(G-te)/Z*te}}}i==="xAxis"?R=[n.left+(A.left||0)+(j||0),n.left+n.width-(A.right||0)-(j||0)]:i==="yAxis"?R=c==="horizontal"?[n.top+n.height-(A.bottom||0),n.top+(A.top||0)]:[n.top+(A.top||0)+(j||0),n.top+n.height-(A.bottom||0)-(j||0)]:R=w.range,E&&(R=[R[1],R[0]]);var re=LI(w,o,y),W=re.scale,I=re.realScaleType;W.domain(x).range(R),BI(W);var z=FI(W,dn(dn({},w),{},{realScaleType:I}));i==="xAxis"?(q=v==="top"&&!P||v==="bottom"&&P,N=n.left,V=h[T]-q*w.height):i==="yAxis"&&(q=v==="left"&&!P||v==="right"&&P,N=h[T]-q*w.width,V=n.top);var le=dn(dn(dn({},w),z),{},{realScaleType:I,x:N,y:V,scale:W,width:i==="xAxis"?n.width:w.width,height:i==="yAxis"?n.height:w.height});return le.bandSize=Md(le,z),!w.hide&&i==="xAxis"?h[T]+=(q?-1:1)*le.height:w.hide||(h[T]+=(q?-1:1)*le.width),dn(dn({},b),{},Uh({},S,le))},{})},g$=function(t,r){var n=t.x,i=t.y,o=r.x,s=r.y;return{x:Math.min(n,o),y:Math.min(i,s),width:Math.abs(o-n),height:Math.abs(s-i)}},See=function(t){var r=t.x1,n=t.y1,i=t.x2,o=t.y2;return g$({x:r,y:n},{x:i,y:o})},v$=(function(){function e(t){bee(this,e),this.scale=t}return wee(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,o=n.position;if(r!==void 0){if(o)switch(o){case"start":return this.scale(r);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+s}case"end":{var u=this.bandwidth?this.bandwidth():0;return this.scale(r)+u}default:return this.scale(r)}if(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+c}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],o=n[n.length-1];return i<=o?r>=i&&r<=o:r>=o&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])})();Uh(v$,"EPS",1e-4);var O1=function(t){var r=Object.keys(t).reduce(function(n,i){return dn(dn({},n),{},Uh({},i,v$.create(t[i])))},{});return dn(dn({},r),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=o.bandAware,u=o.position;return GZ(i,function(c,d){return r[d].apply(c,{bandAware:s,position:u})})},isInRange:function(i){return eee(i,function(o,s){return r[s].isInRange(o)})}})};function Oee(e){return(e%180+180)%180}var Eee=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=Oee(i),s=o*Math.PI/180,u=Math.atan(n/r),c=s>u&&s-1?c[d?o[p]:p]:void 0}}return eb=n,eb}var tb,f2;function Pee(){if(f2)return tb;f2=1;var e=u$();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return tb=t,tb}var rb,d2;function Tee(){if(d2)return rb;d2=1;var e=xM(),t=jn(),r=Pee(),n=Math.max;function i(o,s,u){var c=o==null?0:o.length;if(!c)return-1;var d=u==null?0:r(u);return d<0&&(d=n(c+d,0)),e(o,t(s,3),d)}return rb=i,rb}var nb,h2;function Cee(){if(h2)return nb;h2=1;var e=Aee(),t=Tee(),r=e(t);return nb=r,nb}Cee();var kee=DN();const jee=tt(kee);var Ree=jee(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),b$=$.createContext(void 0),w$=$.createContext(void 0),x$=$.createContext(void 0),Nee=$.createContext({}),_$=$.createContext(void 0),S$=$.createContext(0),O$=$.createContext(0),p2=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,o=r.offset,s=t.clipPathId,u=t.children,c=t.width,d=t.height,p=Ree(o);return H.createElement(b$.Provider,{value:n},H.createElement(w$.Provider,{value:i},H.createElement(Nee.Provider,{value:o},H.createElement(x$.Provider,{value:p},H.createElement(_$.Provider,{value:s},H.createElement(S$.Provider,{value:d},H.createElement(O$.Provider,{value:c},u)))))))},Mee=function(){return $.useContext(_$)},E$=function(t){var r=$.useContext(b$);r==null&&Qo();var n=r[t];return n==null&&Qo(),n},A$=function(t){var r=$.useContext(w$);r==null&&Qo();var n=r[t];return n==null&&Qo(),n},Iee=function(){var t=$.useContext(x$);return t},P$=function(){return $.useContext(O$)},T$=function(){return $.useContext(S$)};function vs(e){"@babel/helpers - typeof";return vs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vs(e)}function $ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dee(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);re*i)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-i)<=0}function vte(e,t){return I$(e,t+1)}function bte(e,t,r,n,i){for(var o=(n||[]).slice(),s=t.start,u=t.end,c=0,d=1,p=s,h=function(){var S=n==null?void 0:n[c];if(S===void 0)return{v:I$(n,d)};var w=c,v,x=function(){return v===void 0&&(v=r(S,w)),v},O=S.coordinate,A=c===0||th(e,O,x,p,u);A||(c=0,p=s,d+=1),A&&(p=O+e*(x()/2+i),c+=d)},y;d<=o.length;)if(y=h(),y)return y.v;return[]}function Lu(e){"@babel/helpers - typeof";return Lu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lu(e)}function _2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function or(e){for(var t=1;t0?b.coordinate-v*e:b.coordinate})}else o[y]=b=or(or({},b),{},{tickCoord:b.coordinate});var x=th(e,b.tickCoord,w,u,c);x&&(c=b.tickCoord-e*(w()/2+i),o[y]=or(or({},b),{},{isShow:!0}))},p=s-1;p>=0;p--)d(p);return o}function Ote(e,t,r,n,i,o){var s=(n||[]).slice(),u=s.length,c=t.start,d=t.end;if(o){var p=n[u-1],h=r(p,u-1),y=e*(p.coordinate+e*h/2-d);s[u-1]=p=or(or({},p),{},{tickCoord:y>0?p.coordinate-y*e:p.coordinate});var b=th(e,p.tickCoord,function(){return h},c,d);b&&(d=p.tickCoord-e*(h/2+i),s[u-1]=or(or({},p),{},{isShow:!0}))}for(var S=o?u-1:u,w=function(O){var A=s[O],P,E=function(){return P===void 0&&(P=r(A,O)),P};if(O===0){var T=e*(A.coordinate-e*E()/2-c);s[O]=A=or(or({},A),{},{tickCoord:T<0?A.coordinate-T*e:A.coordinate})}else s[O]=A=or(or({},A),{},{tickCoord:A.coordinate});var j=th(e,A.tickCoord,E,c,d);j&&(c=A.tickCoord+e*(E()/2+i),s[O]=or(or({},A),{},{isShow:!0}))},v=0;v=2?fr(i[1].coordinate-i[0].coordinate):1,x=gte(o,v,b);return c==="equidistantPreserveStart"?bte(v,x,w,i,s):(c==="preserveStart"||c==="preserveStartEnd"?y=Ote(v,x,w,i,s,c==="preserveStartEnd"):y=Ste(v,x,w,i,s),y.filter(function(O){return O.isShow}))}var Ate=["viewBox"],Pte=["viewBox"],Tte=["ticks"];function xs(e){"@babel/helpers - typeof";return xs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xs(e)}function La(){return La=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Cte(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function kte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O2(e,t){for(var r=0;r0?c(this.props):c(b)),s<=0||u<=0||!S||!S.length?null:H.createElement(et,{className:Be("recharts-cartesian-axis",d),ref:function(v){n.layerReference=v}},o&&this.renderAxisLine(),this.renderTicks(S,this.state.fontSize,this.state.letterSpacing),Wt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,o){var s,u=Be(i.className,"recharts-cartesian-axis-tick-value");return H.isValidElement(n)?s=H.cloneElement(n,$t($t({},i),{},{className:u})):De(n)?s=n($t($t({},i),{},{className:u})):s=H.createElement(Go,La({},i,{className:"recharts-cartesian-axis-tick-value"}),o),s}}])})($.Component);P1(Kh,"displayName","CartesianAxis");P1(Kh,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});function _s(e){"@babel/helpers - typeof";return _s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_s(e)}function Dte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lte(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ere(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Are(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pre(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?s:t&&t.length&&fe(i)&&fe(o)?t.slice(i,o+1):[]};function Y$(e){return e==="number"?[0,"auto"]:void 0}var ix=function(t,r,n,i){var o=t.graphicalItems,s=t.tooltipAxis,u=Xh(r,t);return n<0||!o||!o.length||n>=u.length?null:o.reduce(function(c,d){var p,h=(p=d.props.data)!==null&&p!==void 0?p:r;h&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(h=h.slice(t.dataStartIndex,t.dataEndIndex+1));var y;if(s.dataKey&&!s.allowDuplicatedCategory){var b=h===void 0?u:h;y=Lb(b,s.dataKey,i)}else y=h&&h[n]||u[n];return y?[].concat(Es(c),[UI(d,y)]):c},[])},j2=function(t,r,n,i){var o=i||{x:t.chartX,y:t.chartY},s=Bre(o,n),u=t.orderedTooltipTicks,c=t.tooltipAxis,d=t.tooltipTicks,p=$X(s,u,d,c);if(p>=0&&d){var h=d[p]&&d[p].value,y=ix(t,r,p,h),b=Fre(n,u,p,o);return{activeTooltipIndex:p,activeLabel:h,activePayload:y,activeCoordinate:b}}return null},qre=function(t,r){var n=r.axes,i=r.graphicalItems,o=r.axisType,s=r.axisIdKey,u=r.stackGroups,c=r.dataStartIndex,d=r.dataEndIndex,p=t.layout,h=t.children,y=t.stackOffset,b=DI(p,o);return n.reduce(function(S,w){var v,x=w.type.defaultProps!==void 0?ne(ne({},w.type.defaultProps),w.props):w.props,O=x.type,A=x.dataKey,P=x.allowDataOverflow,E=x.allowDuplicatedCategory,T=x.scale,j=x.ticks,R=x.includeHidden,N=x[s];if(S[N])return S;var V=Xh(t.data,{graphicalItems:i.filter(function(z){var le,pe=s in z.props?z.props[s]:(le=z.type.defaultProps)===null||le===void 0?void 0:le[s];return pe===N}),dataStartIndex:c,dataEndIndex:d}),q=V.length,L,K,Y;hre(x.domain,P,O)&&(L=bw(x.domain,null,P),b&&(O==="number"||T!=="auto")&&(Y=Yl(V,A,"category")));var Q=Y$(O);if(!L||L.length===0){var Z,te=(Z=x.domain)!==null&&Z!==void 0?Z:Q;if(A){if(L=Yl(V,A,O),O==="category"&&b){var G=kU(L);E&&G?(K=L,L=Kd(0,q)):E||(L=Lk(te,L,w).reduce(function(z,le){return z.indexOf(le)>=0?z:[].concat(Es(z),[le])},[]))}else if(O==="category")E?L=L.filter(function(z){return z!==""&&!Ue(z)}):L=Lk(te,L,w).reduce(function(z,le){return z.indexOf(le)>=0||le===""||Ue(le)?z:[].concat(Es(z),[le])},[]);else if(O==="number"){var re=qX(V,i.filter(function(z){var le,pe,he=s in z.props?z.props[s]:(le=z.type.defaultProps)===null||le===void 0?void 0:le[s],we="hide"in z.props?z.props.hide:(pe=z.type.defaultProps)===null||pe===void 0?void 0:pe.hide;return he===N&&(R||!we)}),A,o,p);re&&(L=re)}b&&(O==="number"||T!=="auto")&&(Y=Yl(V,A,"category"))}else b?L=Kd(0,q):u&&u[N]&&u[N].hasStack&&O==="number"?L=y==="expand"?[0,1]:qI(u[N].stackGroups,c,d):L=$I(V,i.filter(function(z){var le=s in z.props?z.props[s]:z.type.defaultProps[s],pe="hide"in z.props?z.props.hide:z.type.defaultProps.hide;return le===N&&(R||!pe)}),O,p,!0);if(O==="number")L=tx(h,L,N,o,j),te&&(L=bw(te,L,P));else if(O==="category"&&te){var W=te,I=L.every(function(z){return W.indexOf(z)>=0});I&&(L=W)}}return ne(ne({},S),{},Me({},N,ne(ne({},x),{},{axisType:o,domain:L,categoricalDomain:Y,duplicateDomain:K,originalDomain:(v=x.domain)!==null&&v!==void 0?v:Q,isCategorical:b,layout:p})))},{})},Ure=function(t,r){var n=r.graphicalItems,i=r.Axis,o=r.axisType,s=r.axisIdKey,u=r.stackGroups,c=r.dataStartIndex,d=r.dataEndIndex,p=t.layout,h=t.children,y=Xh(t.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:d}),b=y.length,S=DI(p,o),w=-1;return n.reduce(function(v,x){var O=x.type.defaultProps!==void 0?ne(ne({},x.type.defaultProps),x.props):x.props,A=O[s],P=Y$("number");if(!v[A]){w++;var E;return S?E=Kd(0,b):u&&u[A]&&u[A].hasStack?(E=qI(u[A].stackGroups,c,d),E=tx(h,E,A,o)):(E=bw(P,$I(y,n.filter(function(T){var j,R,N=s in T.props?T.props[s]:(j=T.type.defaultProps)===null||j===void 0?void 0:j[s],V="hide"in T.props?T.props.hide:(R=T.type.defaultProps)===null||R===void 0?void 0:R.hide;return N===A&&!V}),"number",p),i.defaultProps.allowDataOverflow),E=tx(h,E,A,o)),ne(ne({},v),{},Me({},A,ne(ne({axisType:o},i.defaultProps),{},{hide:!0,orientation:Nr(Dre,"".concat(o,".").concat(w%2),null),domain:E,originalDomain:P,isCategorical:S,layout:p})))}return v},{})},zre=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,o=r.AxisComp,s=r.graphicalItems,u=r.stackGroups,c=r.dataStartIndex,d=r.dataEndIndex,p=t.children,h="".concat(i,"Id"),y=Gr(p,o),b={};return y&&y.length?b=qre(t,{axes:y,graphicalItems:s,axisType:i,axisIdKey:h,stackGroups:u,dataStartIndex:c,dataEndIndex:d}):s&&s.length&&(b=Ure(t,{Axis:o,graphicalItems:s,axisType:i,axisIdKey:h,stackGroups:u,dataStartIndex:c,dataEndIndex:d})),b},Hre=function(t){var r=Ma(t),n=ko(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Gx(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Md(r,n)}},R2=function(t){var r=t.children,n=t.defaultShowTooltip,i=jr(r,ys),o=0,s=0;return t.data&&t.data.length!==0&&(s=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(s=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!n}},Wre=function(t){return!t||!t.length?!1:t.some(function(r){var n=Gn(r&&r.type);return n&&n.indexOf("Bar")>=0})},N2=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Vre=function(t,r){var n=t.props,i=t.graphicalItems,o=t.xAxisMap,s=o===void 0?{}:o,u=t.yAxisMap,c=u===void 0?{}:u,d=n.width,p=n.height,h=n.children,y=n.margin||{},b=jr(h,ys),S=jr(h,qa),w=Object.keys(c).reduce(function(E,T){var j=c[T],R=j.orientation;return!j.mirror&&!j.hide?ne(ne({},E),{},Me({},R,E[R]+j.width)):E},{left:y.left||0,right:y.right||0}),v=Object.keys(s).reduce(function(E,T){var j=s[T],R=j.orientation;return!j.mirror&&!j.hide?ne(ne({},E),{},Me({},R,Nr(E,"".concat(R))+j.height)):E},{top:y.top||0,bottom:y.bottom||0}),x=ne(ne({},v),w),O=x.bottom;b&&(x.bottom+=b.props.height||ys.defaultProps.height),S&&r&&(x=BX(x,i,n,r));var A=d-x.left-x.right,P=p-x.top-x.bottom;return ne(ne({brushBottom:O},x),{},{width:Math.max(A,0),height:Math.max(P,0)})},Kre=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},Q$=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,s=t.validateTooltipEventTypes,u=s===void 0?["axis"]:s,c=t.axisComponents,d=t.legendContent,p=t.formatAxisMap,h=t.defaultProps,y=function(x,O){var A=O.graphicalItems,P=O.stackGroups,E=O.offset,T=O.updateId,j=O.dataStartIndex,R=O.dataEndIndex,N=x.barSize,V=x.layout,q=x.barGap,L=x.barCategoryGap,K=x.maxBarSize,Y=N2(V),Q=Y.numericAxisName,Z=Y.cateAxisName,te=Wre(A),G=[];return A.forEach(function(re,W){var I=Xh(x.data,{graphicalItems:[re],dataStartIndex:j,dataEndIndex:R}),z=re.type.defaultProps!==void 0?ne(ne({},re.type.defaultProps),re.props):re.props,le=z.dataKey,pe=z.maxBarSize,he=z["".concat(Q,"Id")],we=z["".concat(Z,"Id")],ye={},Ae=c.reduce(function(wt,pr){var ai=O["".concat(pr.axisType,"Map")],Zr=z["".concat(pr.axisType,"Id")];ai&&ai[Zr]||pr.axisType==="zAxis"||Qo();var Ls=ai[Zr];return ne(ne({},wt),{},Me(Me({},pr.axisType,Ls),"".concat(pr.axisType,"Ticks"),ko(Ls)))},ye),ie=Ae[Z],Ee=Ae["".concat(Z,"Ticks")],Re=P&&P[he]&&P[he].hasStack&&YX(re,P[he].stackGroups),oe=Gn(re.type).indexOf("Bar")>=0,Le=Md(ie,Ee),Ce=[],dt=te&&DX({barSize:N,stackGroups:P,totalSize:Kre(Ae,Z)});if(oe){var at,rt,Te=Ue(pe)?K:pe,it=(at=(rt=Md(ie,Ee,!0))!==null&&rt!==void 0?rt:Te)!==null&&at!==void 0?at:0;Ce=LX({barGap:q,barCategoryGap:L,bandSize:it!==Le?it:Le,sizeList:dt[we],maxBarSize:Te}),it!==Le&&(Ce=Ce.map(function(wt){return ne(ne({},wt),{},{position:ne(ne({},wt.position),{},{offset:wt.position.offset-it/2})})}))}var Rt=re&&re.type&&re.type.getComposedData;Rt&&G.push({props:ne(ne({},Rt(ne(ne({},Ae),{},{displayedData:I,props:x,dataKey:le,item:re,bandSize:Le,barPosition:Ce,offset:E,stackedData:Re,layout:V,dataStartIndex:j,dataEndIndex:R}))),{},Me(Me(Me({key:re.key||"item-".concat(W)},Q,Ae[Q]),Z,Ae[Z]),"animationId",T)),childIndex:UU(re,x.children),item:re})}),G},b=function(x,O){var A=x.props,P=x.dataStartIndex,E=x.dataEndIndex,T=x.updateId;if(!ZA({props:A}))return null;var j=A.children,R=A.layout,N=A.stackOffset,V=A.data,q=A.reverseStackOrder,L=N2(R),K=L.numericAxisName,Y=L.cateAxisName,Q=Gr(j,n),Z=XX(V,Q,"".concat(K,"Id"),"".concat(Y,"Id"),N,q),te=c.reduce(function(z,le){var pe="".concat(le.axisType,"Map");return ne(ne({},z),{},Me({},pe,zre(A,ne(ne({},le),{},{graphicalItems:Q,stackGroups:le.axisType===K&&Z,dataStartIndex:P,dataEndIndex:E}))))},{}),G=Vre(ne(ne({},te),{},{props:A,graphicalItems:Q}),O==null?void 0:O.legendBBox);Object.keys(te).forEach(function(z){te[z]=p(A,te[z],G,z.replace("Map",""),r)});var re=te["".concat(Y,"Map")],W=Hre(re),I=y(A,ne(ne({},te),{},{dataStartIndex:P,dataEndIndex:E,updateId:T,graphicalItems:Q,stackGroups:Z,offset:G}));return ne(ne({formattedGraphicalItems:I,graphicalItems:Q,offset:G,stackGroups:Z},W),te)},S=(function(v){function x(O){var A,P,E;return Are(this,x),E=Cre(this,x,[O]),Me(E,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Me(E,"accessibilityManager",new dre),Me(E,"handleLegendBBoxUpdate",function(T){if(T){var j=E.state,R=j.dataStartIndex,N=j.dataEndIndex,V=j.updateId;E.setState(ne({legendBBox:T},b({props:E.props,dataStartIndex:R,dataEndIndex:N,updateId:V},ne(ne({},E.state),{},{legendBBox:T}))))}}),Me(E,"handleReceiveSyncEvent",function(T,j,R){if(E.props.syncId===T){if(R===E.eventEmitterSymbol&&typeof E.props.syncMethod!="function")return;E.applySyncEvent(j)}}),Me(E,"handleBrushChange",function(T){var j=T.startIndex,R=T.endIndex;if(j!==E.state.dataStartIndex||R!==E.state.dataEndIndex){var N=E.state.updateId;E.setState(function(){return ne({dataStartIndex:j,dataEndIndex:R},b({props:E.props,dataStartIndex:j,dataEndIndex:R,updateId:N},E.state))}),E.triggerSyncEvent({dataStartIndex:j,dataEndIndex:R})}}),Me(E,"handleMouseEnter",function(T){var j=E.getMouseInfo(T);if(j){var R=ne(ne({},j),{},{isTooltipActive:!0});E.setState(R),E.triggerSyncEvent(R);var N=E.props.onMouseEnter;De(N)&&N(R,T)}}),Me(E,"triggeredAfterMouseMove",function(T){var j=E.getMouseInfo(T),R=j?ne(ne({},j),{},{isTooltipActive:!0}):{isTooltipActive:!1};E.setState(R),E.triggerSyncEvent(R);var N=E.props.onMouseMove;De(N)&&N(R,T)}),Me(E,"handleItemMouseEnter",function(T){E.setState(function(){return{isTooltipActive:!0,activeItem:T,activePayload:T.tooltipPayload,activeCoordinate:T.tooltipPosition||{x:T.cx,y:T.cy}}})}),Me(E,"handleItemMouseLeave",function(){E.setState(function(){return{isTooltipActive:!1}})}),Me(E,"handleMouseMove",function(T){T.persist(),E.throttleTriggeredAfterMouseMove(T)}),Me(E,"handleMouseLeave",function(T){E.throttleTriggeredAfterMouseMove.cancel();var j={isTooltipActive:!1};E.setState(j),E.triggerSyncEvent(j);var R=E.props.onMouseLeave;De(R)&&R(j,T)}),Me(E,"handleOuterEvent",function(T){var j=qU(T),R=Nr(E.props,"".concat(j));if(j&&De(R)){var N,V;/.*touch.*/i.test(j)?V=E.getMouseInfo(T.changedTouches[0]):V=E.getMouseInfo(T),R((N=V)!==null&&N!==void 0?N:{},T)}}),Me(E,"handleClick",function(T){var j=E.getMouseInfo(T);if(j){var R=ne(ne({},j),{},{isTooltipActive:!0});E.setState(R),E.triggerSyncEvent(R);var N=E.props.onClick;De(N)&&N(R,T)}}),Me(E,"handleMouseDown",function(T){var j=E.props.onMouseDown;if(De(j)){var R=E.getMouseInfo(T);j(R,T)}}),Me(E,"handleMouseUp",function(T){var j=E.props.onMouseUp;if(De(j)){var R=E.getMouseInfo(T);j(R,T)}}),Me(E,"handleTouchMove",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&E.throttleTriggeredAfterMouseMove(T.changedTouches[0])}),Me(E,"handleTouchStart",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&E.handleMouseDown(T.changedTouches[0])}),Me(E,"handleTouchEnd",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&E.handleMouseUp(T.changedTouches[0])}),Me(E,"handleDoubleClick",function(T){var j=E.props.onDoubleClick;if(De(j)){var R=E.getMouseInfo(T);j(R,T)}}),Me(E,"handleContextMenu",function(T){var j=E.props.onContextMenu;if(De(j)){var R=E.getMouseInfo(T);j(R,T)}}),Me(E,"triggerSyncEvent",function(T){E.props.syncId!==void 0&&ab.emit(sb,E.props.syncId,T,E.eventEmitterSymbol)}),Me(E,"applySyncEvent",function(T){var j=E.props,R=j.layout,N=j.syncMethod,V=E.state.updateId,q=T.dataStartIndex,L=T.dataEndIndex;if(T.dataStartIndex!==void 0||T.dataEndIndex!==void 0)E.setState(ne({dataStartIndex:q,dataEndIndex:L},b({props:E.props,dataStartIndex:q,dataEndIndex:L,updateId:V},E.state)));else if(T.activeTooltipIndex!==void 0){var K=T.chartX,Y=T.chartY,Q=T.activeTooltipIndex,Z=E.state,te=Z.offset,G=Z.tooltipTicks;if(!te)return;if(typeof N=="function")Q=N(G,T);else if(N==="value"){Q=-1;for(var re=0;re=0){var Re,oe;if(K.dataKey&&!K.allowDuplicatedCategory){var Le=typeof K.dataKey=="function"?Ee:"payload.".concat(K.dataKey.toString());Re=Lb(re,Le,Q),oe=W&&I&&Lb(I,Le,Q)}else Re=re==null?void 0:re[Y],oe=W&&I&&I[Y];if(we||he){var Ce=T.props.activeIndex!==void 0?T.props.activeIndex:Y;return[$.cloneElement(T,ne(ne(ne({},N.props),Ae),{},{activeIndex:Ce})),null,null]}if(!Ue(Re))return[ie].concat(Es(E.renderActivePoints({item:N,activePoint:Re,basePoint:oe,childIndex:Y,isRange:W})))}else{var dt,at=(dt=E.getItemByXY(E.state.activeCoordinate))!==null&&dt!==void 0?dt:{graphicalItem:ie},rt=at.graphicalItem,Te=rt.item,it=Te===void 0?T:Te,Rt=rt.childIndex,wt=ne(ne(ne({},N.props),Ae),{},{activeIndex:Rt});return[$.cloneElement(it,wt),null,null]}return W?[ie,null,null]:[ie,null]}),Me(E,"renderCustomized",function(T,j,R){return $.cloneElement(T,ne(ne({key:"recharts-customized-".concat(R)},E.props),E.state))}),Me(E,"renderMap",{CartesianGrid:{handler:Uf,once:!0},ReferenceArea:{handler:E.renderReferenceElement},ReferenceLine:{handler:Uf},ReferenceDot:{handler:E.renderReferenceElement},XAxis:{handler:Uf},YAxis:{handler:Uf},Brush:{handler:E.renderBrush,once:!0},Bar:{handler:E.renderGraphicChild},Line:{handler:E.renderGraphicChild},Area:{handler:E.renderGraphicChild},Radar:{handler:E.renderGraphicChild},RadialBar:{handler:E.renderGraphicChild},Scatter:{handler:E.renderGraphicChild},Pie:{handler:E.renderGraphicChild},Funnel:{handler:E.renderGraphicChild},Tooltip:{handler:E.renderCursor,once:!0},PolarGrid:{handler:E.renderPolarGrid,once:!0},PolarAngleAxis:{handler:E.renderPolarAxis},PolarRadiusAxis:{handler:E.renderPolarAxis},Customized:{handler:E.renderCustomized}}),E.clipPathId="".concat((A=O.id)!==null&&A!==void 0?A:rc("recharts"),"-clip"),E.throttleTriggeredAfterMouseMove=MM(E.triggeredAfterMouseMove,(P=O.throttleDelay)!==null&&P!==void 0?P:1e3/60),E.state={},E}return Rre(x,v),Tre(x,[{key:"componentDidMount",value:function(){var A,P;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(A=this.props.margin.left)!==null&&A!==void 0?A:0,top:(P=this.props.margin.top)!==null&&P!==void 0?P:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var A=this.props,P=A.children,E=A.data,T=A.height,j=A.layout,R=jr(P,Wr);if(R){var N=R.props.defaultIndex;if(!(typeof N!="number"||N<0||N>this.state.tooltipTicks.length-1)){var V=this.state.tooltipTicks[N]&&this.state.tooltipTicks[N].value,q=ix(this.state,E,N,V),L=this.state.tooltipTicks[N].coordinate,K=(this.state.offset.top+T)/2,Y=j==="horizontal",Q=Y?{x:L,y:K}:{y:L,x:K},Z=this.state.formattedGraphicalItems.find(function(G){var re=G.item;return re.type.name==="Scatter"});Z&&(Q=ne(ne({},Q),Z.props.points[N].tooltipPosition),q=Z.props.points[N].tooltipPayload);var te={activeTooltipIndex:N,isTooltipActive:!0,activeLabel:V,activePayload:q,activeCoordinate:Q};this.setState(te),this.renderCursor(R),this.accessibilityManager.setIndex(N)}}}},{key:"getSnapshotBeforeUpdate",value:function(A,P){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==P.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==A.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==A.margin){var E,T;this.accessibilityManager.setDetails({offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0}})}return null}},{key:"componentDidUpdate",value:function(A){Fb([jr(A.children,Wr)],[jr(this.props.children,Wr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var A=jr(this.props.children,Wr);if(A&&typeof A.props.shared=="boolean"){var P=A.props.shared?"axis":"item";return u.indexOf(P)>=0?P:o}return o}},{key:"getMouseInfo",value:function(A){if(!this.container)return null;var P=this.container,E=P.getBoundingClientRect(),T=TW(E),j={chartX:Math.round(A.pageX-T.left),chartY:Math.round(A.pageY-T.top)},R=E.width/P.offsetWidth||1,N=this.inRange(j.chartX,j.chartY,R);if(!N)return null;var V=this.state,q=V.xAxisMap,L=V.yAxisMap,K=this.getTooltipEventType(),Y=j2(this.state,this.props.data,this.props.layout,N);if(K!=="axis"&&q&&L){var Q=Ma(q).scale,Z=Ma(L).scale,te=Q&&Q.invert?Q.invert(j.chartX):null,G=Z&&Z.invert?Z.invert(j.chartY):null;return ne(ne({},j),{},{xValue:te,yValue:G},Y)}return Y?ne(ne({},j),Y):null}},{key:"inRange",value:function(A,P){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,T=this.props.layout,j=A/E,R=P/E;if(T==="horizontal"||T==="vertical"){var N=this.state.offset,V=j>=N.left&&j<=N.left+N.width&&R>=N.top&&R<=N.top+N.height;return V?{x:j,y:R}:null}var q=this.state,L=q.angleAxisMap,K=q.radiusAxisMap;if(L&&K){var Y=Ma(L);return qk({x:j,y:R},Y)}return null}},{key:"parseEventsOfWrapper",value:function(){var A=this.props.children,P=this.getTooltipEventType(),E=jr(A,Wr),T={};E&&P==="axis"&&(E.props.trigger==="click"?T={onClick:this.handleClick}:T={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var j=ud(this.props,this.handleOuterEvent);return ne(ne({},j),T)}},{key:"addListener",value:function(){ab.on(sb,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){ab.removeListener(sb,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(A,P,E){for(var T=this.state.formattedGraphicalItems,j=0,R=T.length;je&&t&&t.length?C.jsxs("div",{style:{background:"rgba(19,39,51,0.95)",border:"1px solid rgba(90,202,194,0.3)",borderRadius:6,padding:12},children:[C.jsx("p",{style:{color:"#65cec7",fontSize:12,fontWeight:700,margin:"0 0 6px"},children:r}),t.map((n,i)=>{var o;return C.jsxs("p",{style:{color:n.color,fontSize:12,margin:0},children:[n.name,": $",(o=n.value)==null?void 0:o.toFixed(1),"B"]},i)})]}):null;function Zre({metrics:e}){if(!e||e.length===0)return null;const t=[...e].filter(c=>c.state&&c.residential_equity_b).sort((c,d)=>d.residential_equity_b-c.residential_equity_b).slice(0,10).map(c=>{var d;return{name:((d=En[c.state])==null?void 0:d.abbr)||c.state.slice(0,2).toUpperCase(),equity:c.residential_equity_b,debt:c.mortgage_debt_b}}),r=t.slice(0,5),n=Math.max(...r.map(c=>c.equity),1),i=e.reduce((c,d)=>c+(d.residential_equity_b||0),0),o=e.reduce((c,d)=>c+(d.mortgage_debt_b||0),0),s=e.reduce((c,d)=>c+(d.residential_value_b||0),0),u=[{name:"Net Equity (CHX-Backed)",value:i,color:M2},{name:"Mortgage Debt",value:o,color:Qre}];return C.jsx("section",{id:"stats",className:"relative",style:{padding:"92px 5%",background:"#dfe9ed",color:Yre,borderBottom:"1px solid rgba(176,207,216,0.1)"},children:C.jsxs("div",{className:"max-w-[1180px] mx-auto",children:[C.jsxs("div",{className:"mb-[42px]",style:{maxWidth:680},children:[C.jsx("p",{style:{margin:"0 0 13px",color:"#178e8a",fontSize:11,fontWeight:750,letterSpacing:"0.18em",textTransform:"uppercase"},children:"National Stats"}),C.jsx("h2",{style:{color:"#18333e",fontSize:40,lineHeight:1.08,letterSpacing:"-0.045em",fontWeight:700,margin:0},children:"A clearer view of residential equity."}),C.jsx("p",{style:{margin:"16px 0 0",color:"#58727c",lineHeight:1.7,fontSize:16},children:"Market data organized into a single, accountable picture of eligible owner-occupied units."})]}),C.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[1.08fr_0.92fr] gap-8 md:gap-[35px] mb-12",style:{alignItems:"center"},children:[C.jsxs("div",{className:"relative overflow-hidden",style:{minHeight:315,border:"1px solid rgba(24,93,103,0.22)",background:"#cbdce0",boxShadow:"0 18px 42px rgba(24,47,55,0.15)"},children:[C.jsx("img",{src:Gre,alt:"US residential equity heatmap",className:"w-full",style:{height:315,objectFit:"cover",mixBlendMode:"multiply",opacity:.83}}),C.jsx("div",{className:"absolute inset-0",style:{background:"radial-gradient(circle at 36% 57%, rgba(23,157,151,0.4) 0 6px, transparent 8px), radial-gradient(circle at 59% 44%, rgba(23,157,151,0.34) 0 8px, transparent 10px), radial-gradient(circle at 69% 66%, rgba(23,157,151,0.35) 0 6px, transparent 8px)",animation:"glow-pulse 4s ease-in-out infinite"}}),C.jsx("div",{className:"absolute bottom-3 left-4",style:{color:"#17303b",fontSize:13,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase"},children:"State Equity Heatmap"})]}),C.jsxs("div",{className:"flex flex-col gap-3",children:[C.jsx("p",{style:{color:"#178e8a",fontSize:11,fontWeight:750,letterSpacing:"0.18em",textTransform:"uppercase",margin:0},children:"Top States by Equity"}),r.map((c,d)=>C.jsxs("div",{className:"grid items-center",style:{gridTemplateColumns:"30px 1fr 70px",gap:10,fontSize:13,color:"#425f69"},children:[C.jsx("b",{style:{color:"#178e8a",fontWeight:800},children:String(d+1).padStart(2,"0")}),C.jsx("span",{children:c.name}),C.jsx("div",{style:{height:7,background:"#b9ccd1",overflow:"hidden",borderRadius:4},children:C.jsx("div",{style:{height:"100%",background:"#208e8a",width:`${c.equity/n*100}%`,transformOrigin:"left",animation:"build-bar 1s ease both",animationDelay:`${d*.1}s`}})})]},d))]})]}),C.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-12",children:[{label:"Total U.S. Residential Value",value:`$${(s/1e3).toFixed(1)}T`,sub:"Property Market Cap",color:"#17303b"},{label:"Total Mortgage Debt",value:`$${(o/1e3).toFixed(1)}T`,sub:"Nationwide Encumbrances",color:"#9a6b3a"},{label:"CHX-Eligible Net Equity",value:`$${(i/1e3).toFixed(1)}T`,sub:`${(i/s*100).toFixed(1)}% of Total Value`,color:"#178e8a"}].map((c,d)=>C.jsxs("div",{style:{padding:24,background:"rgba(255,255,255,0.7)",border:"1px solid rgba(78,119,130,0.18)",boxShadow:"0 20px 50px rgba(26,52,60,0.13)",borderRadius:8,borderLeft:`3px solid ${c.color}`},children:[C.jsx("div",{style:{color:"#58727c",fontSize:11,fontWeight:700,letterSpacing:"0.1em",textTransform:"uppercase"},children:c.label}),C.jsx("div",{style:{color:c.color,fontSize:30,fontWeight:800,letterSpacing:"-0.03em",margin:"10px 0 4px"},children:c.value}),C.jsx("div",{style:{color:"#7e95a0",fontSize:12},children:c.sub})]},d))}),C.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[C.jsxs("div",{style:{padding:24,background:"rgba(255,255,255,0.7)",border:"1px solid rgba(78,119,130,0.18)",boxShadow:"0 20px 50px rgba(26,52,60,0.13)",borderRadius:8},children:[C.jsx("h3",{style:{color:"#18333e",fontSize:18,fontWeight:700,margin:"0 0 4px"},children:"Top 10 States by CHX Equity"}),C.jsx("p",{style:{color:"#7e95a0",fontSize:12,margin:"0 0 20px"},children:"Net equity backing available for CHX minting"}),C.jsx(rw,{width:"100%",height:260,children:C.jsxs(J$,{data:t,margin:{top:5,right:5,bottom:5,left:5},children:[C.jsx(uc,{dataKey:"name",tick:{fill:"#58727c",fontSize:10},axisLine:!1,tickLine:!1}),C.jsx(cc,{tick:{fill:"#58727c",fontSize:10},axisLine:!1,tickLine:!1,tickFormatter:c=>`$${c}B`}),C.jsx(Wr,{content:C.jsx(Jre,{}),cursor:{fill:"rgba(45,156,152,0.08)"}}),C.jsx(eo,{dataKey:"equity",name:"Net Equity",radius:[4,4,0,0],fill:M2})]})})]}),C.jsxs("div",{style:{padding:24,background:"rgba(255,255,255,0.7)",border:"1px solid rgba(78,119,130,0.18)",boxShadow:"0 20px 50px rgba(26,52,60,0.13)",borderRadius:8},children:[C.jsx("h3",{style:{color:"#18333e",fontSize:18,fontWeight:700,margin:"0 0 4px"},children:"National Equity vs Debt"}),C.jsx("p",{style:{color:"#7e95a0",fontSize:12,margin:"0 0 16px"},children:"Composition of U.S. residential real estate wealth"}),C.jsx("div",{className:"flex-1 flex items-center justify-center",children:C.jsx(rw,{width:"100%",height:220,children:C.jsxs(Xre,{children:[C.jsx(oi,{data:u,cx:"50%",cy:"50%",outerRadius:88,innerRadius:48,dataKey:"value",strokeWidth:0,children:u.map((c,d)=>C.jsx(ic,{fill:c.color},d))}),C.jsx(Wr,{formatter:c=>`$${(c/1e3).toFixed(1)}T`,contentStyle:{background:"rgba(19,39,51,0.95)",border:"1px solid rgba(90,202,194,0.3)",borderRadius:6,color:"#dce7ee"}})]})})}),C.jsx("div",{className:"flex gap-6 justify-center mt-2",children:u.map((c,d)=>C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx("div",{style:{width:12,height:12,borderRadius:3,background:c.color}}),C.jsx("span",{style:{color:"#58727c",fontSize:12},children:c.name})]},d))})]})]})]})})}const ene=[{hash:"0xBTBX...a4f2",state:"CA",coins:"245,800",time:"2s ago",type:"MINT"},{hash:"0xBTBX...c8d1",state:"TX",coins:"189,200",time:"14s ago",type:"MINT"},{hash:"0xBTBX...e3b7",state:"FL",coins:"312,500",time:"31s ago",type:"VERIFY"},{hash:"0xBTBX...9a5c",state:"NY",coins:"421,100",time:"48s ago",type:"MINT"},{hash:"0xBTBX...7f2e",state:"WA",coins:"98,400",time:"1m ago",type:"TRANSFER"},{hash:"0xBTBX...2d8b",state:"CO",coins:"156,700",time:"1m ago",type:"MINT"}],ub={MINT:"#65cec7",VERIFY:"#48aaa5",TRANSFER:"#9fb2bc"};function tne({block:e,index:t}){return C.jsxs("div",{className:"flex items-center gap-4 py-3 transition-colors",style:{borderBottom:"1px solid rgba(165,203,211,0.08)",fontSize:13,animationDelay:`${t*.1}s`},onMouseEnter:r=>r.currentTarget.style.background="rgba(45,156,152,0.05)",onMouseLeave:r=>r.currentTarget.style.background="transparent",children:[C.jsx("div",{className:"flex-shrink-0",style:{width:8,height:8,borderRadius:"50%",background:ub[e.type],animation:"glow-pulse 2s ease-in-out infinite"}}),C.jsx("div",{className:"flex-1 min-w-0",children:C.jsx("div",{className:"truncate",style:{color:"#90a8b2",fontSize:12,fontFamily:"ui-monospace, monospace"},children:e.hash})}),C.jsx("div",{style:{padding:"2px 8px",borderRadius:4,fontSize:10,fontWeight:700,letterSpacing:"0.05em",background:`${ub[e.type]}20`,color:ub[e.type]},children:e.type}),C.jsxs("div",{style:{color:"#65cec7",fontSize:12,fontWeight:700,whiteSpace:"nowrap"},children:["CHX-",e.state]}),C.jsx("div",{style:{color:"#a9bbc4",fontSize:12,whiteSpace:"nowrap"},children:e.coins}),C.jsx("div",{style:{color:"#5d717b",fontSize:11,whiteSpace:"nowrap"},children:e.time})]})}function rne(){const[e,t]=$.useState(8847291),[r,n]=$.useState(4280);return $.useEffect(()=>{const i=setInterval(()=>{t(o=>o+Math.floor(Math.random()*3)+1),n(Math.floor(Math.random()*2e3)+3e3)},3e3);return()=>clearInterval(i)},[]),C.jsx("section",{id:"blockchain",className:"relative",style:{padding:"92px 5%",background:"#0c1822",borderBottom:"1px solid rgba(176,207,216,0.1)"},children:C.jsxs("div",{className:"max-w-[1180px] mx-auto",children:[C.jsxs("div",{className:"mb-10",style:{maxWidth:680},children:[C.jsx("p",{style:{margin:"0 0 13px",color:"#48aaa5",fontSize:11,fontWeight:750,letterSpacing:"0.18em",textTransform:"uppercase"},children:"BTBX Blockchain"}),C.jsx("h2",{style:{color:"#edf6f7",fontSize:40,lineHeight:1.08,letterSpacing:"-0.045em",fontWeight:700,margin:0},children:"Built for accountable settlement."}),C.jsx("p",{style:{margin:"16px 0 0",color:"#90a8b2",lineHeight:1.7,fontSize:16},children:"A durable digital foundation for verification, issuance, and transparent ownership records."})]}),C.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-10",children:[{label:"Block Height",value:e.toLocaleString(),icon:"⛓️"},{label:"TPS",value:r.toLocaleString(),icon:"⚡"},{label:"Validators",value:"2,847",icon:"🔐"},{label:"Total CHX Minted",value:"14.82T",icon:"🪙"}].map((i,o)=>C.jsxs("div",{style:{padding:22,borderRadius:8,background:"linear-gradient(140deg, rgba(30,69,77,0.7), rgba(19,38,51,0.72))",border:"1px solid rgba(83,190,183,0.25)"},children:[C.jsx("div",{style:{fontSize:22,marginBottom:8},children:i.icon}),C.jsx("div",{style:{color:"#8fe0da",fontSize:24,fontWeight:800,letterSpacing:"-0.03em"},children:i.value}),C.jsx("div",{style:{color:"#72939e",fontSize:10,fontWeight:700,letterSpacing:"0.12em",textTransform:"uppercase",marginTop:6},children:i.label})]},o))}),C.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[C.jsxs("div",{style:{padding:26,borderRadius:10,background:"rgba(30,53,66,0.64)",border:"1px solid rgba(165,203,211,0.16)",boxShadow:"0 18px 45px rgba(0,0,0,0.16)"},children:[C.jsxs("div",{className:"flex items-center justify-between mb-5",children:[C.jsx("h3",{style:{color:"#eef6f7",fontSize:18,fontWeight:700,margin:0},children:"Live Transactions"}),C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:"#65cec7",animation:"glow-pulse 2s ease-in-out infinite"}}),C.jsx("span",{style:{color:"#65cec7",fontSize:11,fontWeight:700,letterSpacing:"0.08em"},children:"LIVE"})]})]}),C.jsx("div",{children:ene.map((i,o)=>C.jsx(tne,{block:i,index:o},o))})]}),C.jsxs("div",{style:{padding:26,borderRadius:10,background:"rgba(30,53,66,0.64)",border:"1px solid rgba(165,203,211,0.16)",boxShadow:"0 18px 45px rgba(0,0,0,0.16)"},children:[C.jsx("h3",{style:{color:"#eef6f7",fontSize:18,fontWeight:700,margin:"0 0 18px"},children:"BTBX Technical Specs"}),C.jsx("div",{className:"space-y-0",children:[{label:"Consensus Mechanism",value:"Proof-of-Equity (PoEq)"},{label:"Block Time",value:"2.1 seconds"},{label:"Smart Contract Language",value:"BTBX Solidity v2"},{label:"Finality",value:"Instant (1 block)"},{label:"Privacy Layer",value:"zk-STARK Proofs"},{label:"Chain ID",value:"BTBX-1 (Mainnet)"},{label:"Native Currency",value:"CHX (CHEX Coin)"},{label:"Max Supply",value:"Equity-Indexed (Dynamic)"},{label:"Property NFT Standard",value:"BTBX-721E (Equity NFT)"},{label:"Cross-Chain Bridges",value:"Ethereum, Polygon, Solana"}].map((i,o)=>C.jsxs("div",{className:"flex justify-between items-center py-2.5",style:{borderBottom:"1px solid rgba(165,203,211,0.08)"},children:[C.jsx("span",{style:{color:"#90a8b2",fontSize:13},children:i.label}),C.jsx("span",{style:{color:"#65cec7",fontSize:12,fontWeight:700,textAlign:"right"},children:i.value})]},o))})]})]}),C.jsxs("div",{className:"mt-8",style:{padding:36,borderRadius:10,background:"rgba(30,53,66,0.64)",border:"1px solid rgba(165,203,211,0.16)"},children:[C.jsx("h3",{style:{color:"#eef6f7",fontSize:20,fontWeight:700,marginBottom:24,textAlign:"center"},children:"BTBX Architecture"}),C.jsx("div",{className:"flex flex-col md:flex-row items-center justify-center gap-3 flex-wrap",children:[{label:"Property Submission",icon:"🏠"},{label:"Equity Oracle",icon:"🔮"},{label:"PoEq Consensus",icon:"⚖️"},{label:"CHX Mint",icon:"⛏️"},{label:"Wallet Delivery",icon:"💳"}].map((i,o,s)=>C.jsxs("div",{className:"flex items-center gap-3",children:[C.jsxs("div",{className:"text-center",style:{padding:"12px 16px",borderRadius:8,background:"rgba(45,156,152,0.1)",border:"1px solid rgba(90,202,194,0.3)",minWidth:110},children:[C.jsx("div",{style:{fontSize:20,marginBottom:4},children:i.icon}),C.jsx("div",{style:{color:"#65cec7",fontSize:11,fontWeight:700,letterSpacing:"0.05em"},children:i.label})]}),oe!=="District of Columbia").sort();Z$.push("District of Columbia");function nne(){const[e,t]=$.useState(""),[r,n]=$.useState(""),[i,o]=$.useState(""),[s,u]=$.useState(""),[c,d]=$.useState(""),[p,h]=$.useState(null),[y,b]=$.useState(!1),S=()=>{const O=parseFloat(r.replace(/,/g,""))||0,A=parseFloat(i.replace(/,/g,""))||0,P=parseFloat(s.replace(/,/g,""))||0,E=parseFloat(c.replace(/,/g,""))||0,T=A+P+E,j=O-T,R=O>0?(T/O*100).toFixed(1):0,N=O>0?(j/O*100).toFixed(1):0,V=j>0?j:0;h({val:O,totalDebt:T,netEquity:j,ltv:R,eqPct:N,chxCoins:V,state:e}),b(!0)},w=e?En[e]||{symbol:"CHX",ring:"#2d9c98",color:"#2d9c98",abbr:"??"}:null,v=O=>O?Number(O).toLocaleString("en-US"):"",x=O=>A=>{const P=A.target.value.replace(/,/g,"").replace(/[^0-9.]/g,"");O(P)};return C.jsx("section",{id:"claim",className:"relative",style:{padding:"92px 5%",background:"#dfe9ed",color:"#17303b"},children:C.jsx("div",{className:"max-w-[1180px] mx-auto",children:C.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 items-center",children:[C.jsxs("div",{children:[C.jsx("p",{style:{margin:"0 0 13px",color:"#178e8a",fontSize:11,fontWeight:750,letterSpacing:"0.18em",textTransform:"uppercase"},children:"Equity Calculator"}),C.jsx("h2",{style:{color:"#18333e",fontSize:40,lineHeight:1.08,letterSpacing:"-0.045em",fontWeight:700,margin:0},children:"See what verified equity can represent."}),C.jsx("p",{style:{margin:"16px 0 0",color:"#58727c",lineHeight:1.7,fontSize:16},children:"Explore the relationship between residential equity and CHX stablecoins. 1 dollar of verified property equity equals 1 CHX coin."})]}),C.jsxs("div",{style:{padding:30,borderRadius:10,background:"rgba(255,255,255,0.7)",border:"1px solid rgba(78,119,130,0.2)",boxShadow:"0 20px 50px rgba(26,52,60,0.13)"},children:[C.jsxs("div",{className:"mb-5",children:[C.jsx("label",{style:{display:"block",marginBottom:9,color:"#42616c",fontSize:11,fontWeight:750,letterSpacing:"0.1em",textTransform:"uppercase"},children:"Property State"}),C.jsxs("select",{value:e,onChange:O=>{t(O.target.value),b(!1),h(null)},className:"w-full",style:{padding:"13px 16px",borderRadius:6,background:"#f4f8f9",border:"1px solid #b9cdd2",color:"#173640",fontSize:15,outline:"none"},onFocus:O=>{O.currentTarget.style.borderColor="#2b9b96",O.currentTarget.style.boxShadow="0 0 0 3px rgba(43,155,150,0.12)"},onBlur:O=>{O.currentTarget.style.borderColor="#b9cdd2",O.currentTarget.style.boxShadow="none"},children:[C.jsx("option",{value:"",children:"Select your state..."}),Z$.map(O=>{var A;return C.jsxs("option",{value:O,children:[O," — ",(A=En[O])==null?void 0:A.symbol]},O)})]})]}),[{label:"Appraised Property Value",state:r,setter:n,placeholder:"e.g. 450,000"},{label:"Total Mortgage Balance",state:i,setter:o,placeholder:"e.g. 280,000"},{label:"HELOC / Home Equity Line",state:s,setter:u,placeholder:"e.g. 25,000 (enter 0 if none)"},{label:"All Liens & Encumbrances",state:c,setter:d,placeholder:"e.g. 0"}].map((O,A)=>C.jsxs("div",{className:"mb-4",children:[C.jsx("label",{style:{display:"block",marginBottom:9,color:"#42616c",fontSize:11,fontWeight:750,letterSpacing:"0.1em",textTransform:"uppercase"},children:O.label}),C.jsxs("div",{className:"relative",children:[C.jsx("span",{className:"absolute",style:{left:14,top:"50%",transform:"translateY(-50%)",color:"#7e95a0"},children:"$"}),C.jsx("input",{type:"text",value:O.state?v(O.state):"",onChange:x(O.setter),placeholder:O.placeholder,className:"w-full",style:{paddingLeft:30,paddingRight:16,padding:"13px 16px",borderRadius:6,background:"#f4f8f9",border:"1px solid #b9cdd2",color:"#173640",fontSize:15,outline:"none"},onFocus:P=>{P.currentTarget.style.borderColor="#2b9b96",P.currentTarget.style.boxShadow="0 0 0 3px rgba(43,155,150,0.12)"},onBlur:P=>{P.currentTarget.style.borderColor="#b9cdd2",P.currentTarget.style.boxShadow="none"}})]})]},A)),C.jsx("button",{onClick:S,disabled:!e||!r,className:"w-full transition-all duration-200",style:{padding:"15px",borderRadius:6,background:!e||!r?"rgba(45,156,152,0.3)":"#2d9c98",color:"#07181c",fontSize:12,fontWeight:750,letterSpacing:"0.1em",textTransform:"uppercase",cursor:!e||!r?"not-allowed":"pointer"},onMouseEnter:O=>{e&&r&&(O.currentTarget.style.background="#62d4cc")},onMouseLeave:O=>{e&&r&&(O.currentTarget.style.background="#2d9c98")},children:"Calculate CHX Coins →"}),y&&p&&C.jsxs("div",{className:"mt-6",style:{borderRadius:8,overflow:"hidden",border:`1px solid ${p.netEquity>0?"rgba(45,156,152,0.4)":"rgba(154,107,58,0.4)"}`},children:[C.jsxs("div",{style:{padding:"18px 22px",background:p.netEquity>0?"rgba(45,156,152,0.1)":"rgba(154,107,58,0.1)"},children:[C.jsx("div",{style:{fontSize:11,fontWeight:750,letterSpacing:"0.1em",textTransform:"uppercase",marginBottom:4,color:p.netEquity>0?"#178e8a":"#9a6b3a"},children:p.netEquity>0?"✓ Eligible for CHX Coins":"✗ No Equity Available"}),C.jsx("div",{style:{fontSize:30,fontWeight:800,letterSpacing:"-0.04em",color:p.netEquity>0?"#178e8a":"#9a6b3a"},children:p.netEquity>0?`${p.chxCoins.toLocaleString("en-US",{maximumFractionDigits:0})} CHX`:"0 CHX"}),w&&p.netEquity>0&&C.jsxs("div",{style:{fontSize:12,marginTop:4,color:w.ring,fontWeight:700},children:["as ",w.symbol," on BTBX Blockchain"]})]}),C.jsx("div",{style:{padding:"16px 22px"},children:[{label:"Appraised Value",value:`$${p.val.toLocaleString()}`,color:"#17303b"},{label:"Total Debt & Liens",value:`-$${p.totalDebt.toLocaleString()}`,color:"#9a6b3a"},{label:"Net Equity",value:`$${p.netEquity.toLocaleString()}`,color:p.netEquity>0?"#178e8a":"#9a6b3a"},{label:"Loan-to-Value",value:`${p.ltv}%`,color:"#17303b"},{label:"Equity %",value:`${p.eqPct}%`,color:"#178e8a"}].map((O,A)=>C.jsxs("div",{className:"flex justify-between",style:{padding:"7px 0",fontSize:13,borderBottom:"1px solid rgba(78,119,130,0.1)"},children:[C.jsx("span",{style:{color:"#58727c"},children:O.label}),C.jsx("span",{style:{color:O.color,fontWeight:700},children:O.value})]},A))})]})]})]})})})}function ine(){return C.jsx("footer",{className:"relative",style:{padding:"54px 5% 65px",background:"#09151d",borderTop:"1px solid rgba(156,199,208,0.13)"},children:C.jsxs("div",{className:"max-w-[1180px] mx-auto",children:[C.jsxs("div",{className:"flex flex-col md:flex-row justify-between gap-10 mb-12",children:[C.jsxs("div",{children:[C.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[C.jsx("div",{className:"grid place-items-center",style:{width:38,height:38,borderRadius:9,border:"1px solid #31aaa5",color:"#75ded5",fontSize:11,fontWeight:800,letterSpacing:"-0.08em",boxShadow:"0 0 20px rgba(49,170,165,0.2)"},children:"CHX"}),C.jsxs("div",{children:[C.jsx("div",{style:{color:"#edf7f7",fontSize:16,fontWeight:750,letterSpacing:"0.12em"},children:"CHEX COIN"}),C.jsx("div",{style:{color:"#5d717b",fontSize:9,letterSpacing:"0.18em",marginTop:3},children:"ON BTBX BLOCKCHAIN"})]})]}),C.jsx("p",{style:{color:"#7f98a3",fontSize:13,lineHeight:1.6,maxWidth:320,margin:0},children:"The world's first real estate equity-backed stablecoin. 1 dollar of verified property equity = 1 CHX coin, issued on the BTBX Blockchain."})]}),C.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-10",children:[{title:"Platform",links:["How It Works","State Coins","Equity Calculator","Submit Property","Wallet Setup"]},{title:"BTBX Blockchain",links:["Block Explorer","Network Stats","Validators","Smart Contracts","Developer Docs"]},{title:"Legal",links:["Terms of Service","Privacy Policy","KYC/AML Policy","Regulatory Info","Whitepaper"]}].map((e,t)=>C.jsxs("div",{children:[C.jsx("h4",{style:{color:"#65cec7",fontSize:11,fontWeight:750,letterSpacing:"0.12em",textTransform:"uppercase",margin:"0 0 16px"},children:e.title}),C.jsx("ul",{className:"space-y-2.5",children:e.links.map((r,n)=>C.jsx("li",{children:C.jsx("a",{href:"#",className:"transition-colors",style:{color:"#8eabb4",fontSize:13},onMouseEnter:i=>i.currentTarget.style.color="#6ed3cb",onMouseLeave:i=>i.currentTarget.style.color="#8eabb4",children:r})},n))})]},t))})]}),C.jsx("div",{className:"w-full mb-8",style:{height:1,background:"linear-gradient(90deg, transparent, rgba(72,170,165,0.3), transparent)"}}),C.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-center gap-4",children:[C.jsx("div",{style:{color:"#5d717b",fontSize:12},children:"© 2026 CHEX Coin / BTBX Blockchain. All rights reserved."}),C.jsxs("div",{className:"flex items-center gap-6",children:[C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:"#65cec7",animation:"glow-pulse 2s ease-in-out infinite"}}),C.jsx("span",{style:{color:"#65cec7",fontSize:11,fontWeight:700,letterSpacing:"0.08em"},children:"BTBX MAINNET LIVE"})]}),C.jsx("div",{style:{color:"#5d717b",fontSize:11,fontFamily:"ui-monospace, monospace"},children:"Chain ID: BTBX-1"})]})]}),C.jsx("div",{className:"mt-6 p-4",style:{borderRadius:8,border:"1px solid rgba(72,170,165,0.12)"},children:C.jsx("p",{style:{color:"#5d717b",fontSize:10,lineHeight:1.6,textAlign:"center",margin:0},children:"CHEX Coin (CHX) is a real estate equity-backed digital asset. This is not investment advice. CHX coins represent verified property equity claims only. All submissions are subject to KYC/AML verification and applicable federal and state regulations. Not available where prohibited by law. Past equity values do not guarantee future performance."})})]})})}function one(){const[e,t]=$.useState([]),[r,n]=$.useState(!0);$.useEffect(()=>{Ao.entities.StateMetrics.list("-residential_equity_b",60).then(u=>{t(u),n(!1)})},[]);const i=e.reduce((u,c)=>u+(c.residential_equity_b||0),0),o=e.reduce((u,c)=>u+(c.owner_occupied_units||0),0),s=i*1e9;return r?C.jsxs("div",{className:"fixed inset-0 flex flex-col items-center justify-center",style:{background:"#0c1822"},children:[C.jsxs("div",{className:"relative mb-8",style:{width:88,height:88},children:[C.jsx("div",{className:"absolute inset-0 rounded-full",style:{border:"2px solid rgba(49,170,165,0.2)",animation:"spin-slow 3s linear infinite"}}),C.jsx("div",{className:"absolute inset-3 rounded-full",style:{border:"2px solid rgba(49,170,165,0.4)",animation:"spin-slow 2s linear infinite reverse"}}),C.jsx("div",{className:"absolute inset-5 rounded-full grid place-items-center",style:{background:"linear-gradient(135deg, #83dad3, #157773 48%, #0b3a42)"},children:C.jsx("span",{style:{color:"#06252a",fontSize:13,fontWeight:800,letterSpacing:"-0.1em"},children:"CHX"})})]}),C.jsx("div",{style:{color:"#65cec7",fontSize:13,letterSpacing:"0.2em",textTransform:"uppercase",animation:"glow-pulse 2s ease-in-out infinite"},children:"Loading BTBX Network..."})]}):C.jsxs("div",{className:"min-h-screen",style:{background:"#0c1822"},children:[C.jsx(R6,{}),C.jsxs("div",{className:"pt-[78px]",children:[C.jsx(M6,{totalEquity:Math.round(i),totalUnits:o,totalCoins:s}),C.jsx($6,{}),C.jsx(L6,{}),C.jsx(Zre,{metrics:e}),C.jsx(q6,{metrics:e}),C.jsx(rne,{}),C.jsx(nne,{}),C.jsx(ine,{})]})]})}const ane=({active:e,payload:t})=>{if(!e||!(t!=null&&t.length))return null;const r=t[0].payload,n=En[r.state]||{};return C.jsxs("div",{className:"glass-card rounded-xl p-4 border border-yellow-500/30 min-w-[200px]",children:[C.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[C.jsx("span",{className:"text-lg",children:n.icon||"🏠"}),C.jsx("span",{className:"font-orbitron font-bold text-yellow-400 text-sm",children:r.state})]}),C.jsxs("div",{className:"space-y-1 text-xs font-space",children:[C.jsxs("div",{className:"flex justify-between gap-4",children:[C.jsx("span",{className:"text-gray-400",children:"Equity Backed"}),C.jsxs("span",{className:"text-yellow-400 font-bold",children:["$",r.equity.toFixed(1),"B"]})]}),C.jsxs("div",{className:"flex justify-between gap-4",children:[C.jsx("span",{className:"text-gray-400",children:"CHX Issuable"}),C.jsxs("span",{className:"text-cyan-400 font-bold",children:[(r.equity*1e9/1e12).toFixed(2),"T"]})]}),C.jsxs("div",{className:"flex justify-between gap-4",children:[C.jsx("span",{className:"text-gray-400",children:"Equity %"}),C.jsxs("span",{className:"text-green-400 font-bold",children:[r.equity_pct,"%"]})]})]})]})},zf=({icon:e,label:t,value:r,sub:n,color:i})=>C.jsxs("div",{className:"glass-card rounded-2xl p-6 flex items-center gap-5 border border-yellow-500/10",children:[C.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center flex-shrink-0",style:{background:`${i}22`,border:`1px solid ${i}44`},children:C.jsx(e,{size:22,style:{color:i}})}),C.jsxs("div",{children:[C.jsx("div",{className:"text-gray-500 text-xs font-orbitron tracking-widest uppercase mb-1",children:t}),C.jsx("div",{className:"font-orbitron font-bold text-xl",style:{color:i},children:r}),n&&C.jsx("div",{className:"text-gray-600 text-xs font-space mt-0.5",children:n})]})]});function sne(){const[e,t]=$.useState([]),[r,n]=$.useState(!0),[i,o]=$.useState("equity");$.useEffect(()=>{Ao.entities.StateMetrics.list("-residential_equity_b",60).then(h=>{t(h),n(!1)})},[]);const s=[...e].sort((h,y)=>i==="equity"?(y.residential_equity_b||0)-(h.residential_equity_b||0):i==="units"?(y.owner_occupied_units||0)-(h.owner_occupied_units||0):i==="pct"?(y.equity_percentage||0)-(h.equity_percentage||0):0).map(h=>{var y,b,S;return{state:h.state,abbr:((y=En[h.state])==null?void 0:y.abbr)||((b=h.state)==null?void 0:b.slice(0,2).toUpperCase()),equity:h.residential_equity_b||0,equity_pct:h.equity_percentage||0,units:h.owner_occupied_units||0,color:((S=En[h.state])==null?void 0:S.ring)||"#ffd700"}}),u=e.reduce((h,y)=>h+(y.residential_equity_b||0),0),c=e.reduce((h,y)=>h+(y.owner_occupied_units||0),0),d=e.length?(e.reduce((h,y)=>h+(y.equity_percentage||0),0)/e.length).toFixed(1):0,p=(u*1e9/1e12).toFixed(2);return r?C.jsx("div",{className:"fixed inset-0 flex items-center justify-center",style:{background:"hsl(222,47%,5%)"},children:C.jsx("div",{className:"font-orbitron text-yellow-400 text-sm tracking-widest animate-pulse",children:"LOADING DATA..."})}):C.jsxs("div",{className:"min-h-screen hex-pattern",style:{background:"hsl(222,47%,5%)"},children:[C.jsxs("div",{className:"sticky top-0 z-50 border-b border-yellow-500/10 bg-black/60 backdrop-blur-xl px-6 py-4 flex items-center justify-between",children:[C.jsxs("div",{className:"flex items-center gap-4",children:[C.jsxs(Tb,{to:"/",className:"flex items-center gap-2 text-gray-500 hover:text-yellow-400 transition-colors text-sm font-orbitron",children:[C.jsx(wB,{size:16})," BACK"]}),C.jsx("div",{className:"w-px h-5 bg-yellow-500/20"}),C.jsxs("div",{className:"font-orbitron font-black text-yellow-400 text-sm tracking-widest",children:["CHX ",C.jsx("span",{className:"text-gray-600",children:"/"})," STATE EQUITY DASHBOARD"]})]}),C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx("div",{className:"w-2 h-2 rounded-full bg-green-400 animate-pulse"}),C.jsx("span",{className:"text-green-400 text-xs font-orbitron",children:"LIVE DATA"})]})]}),C.jsxs("div",{className:"max-w-7xl mx-auto px-4 md:px-6 py-10",children:[C.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-10",children:[C.jsx(zf,{icon:EB,label:"Total Backed Equity",value:`$${(u/1e3).toFixed(1)}T`,sub:"USD Residential Equity",color:"#ffd700"}),C.jsx(zf,{icon:SB,label:"CHX Coins Issuable",value:`${p}T`,sub:"1 USD equity = 1 CHX",color:"#00e5ff"}),C.jsx(zf,{icon:PB,label:"Eligible Properties",value:`${(c/1e6).toFixed(1)}M`,sub:"Owner-Occupied Units",color:"#22c55e"}),C.jsx(zf,{icon:jB,label:"Avg Equity Ratio",value:`${d}%`,sub:"Across all states",color:"#a78bfa"})]}),C.jsxs("div",{className:"glass-card rounded-2xl p-6 border border-yellow-500/10 mb-8",children:[C.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-6",children:[C.jsxs("div",{children:[C.jsx("h2",{className:"font-orbitron font-bold text-white text-lg",children:"Residential Equity by State"}),C.jsx("p",{className:"text-gray-500 text-sm font-space mt-0.5",children:"Total CHX-backed equity collateral per state (USD Billions)"})]}),C.jsx("div",{className:"flex gap-2",children:[{key:"equity",label:"By Equity"},{key:"units",label:"By Units"},{key:"pct",label:"By Equity %"}].map(h=>C.jsx("button",{onClick:()=>o(h.key),className:"px-3 py-1.5 rounded-lg text-xs font-orbitron transition-all",style:i===h.key?{background:"rgba(250,189,0,0.2)",color:"#ffd700",border:"1px solid rgba(250,189,0,0.4)"}:{background:"rgba(255,255,255,0.03)",color:"#6b7280",border:"1px solid rgba(255,255,255,0.05)"},children:h.label},h.key))})]}),C.jsx(rw,{width:"100%",height:420,children:C.jsxs(J$,{data:s,margin:{top:5,right:10,left:10,bottom:60},children:[C.jsx(uc,{dataKey:"abbr",tick:{fill:"#6b7280",fontSize:10,fontFamily:"Orbitron"},axisLine:{stroke:"rgba(250,189,0,0.1)"},tickLine:!1,angle:-45,textAnchor:"end",interval:0}),C.jsx(cc,{tick:{fill:"#6b7280",fontSize:10,fontFamily:"Space Grotesk"},axisLine:!1,tickLine:!1,tickFormatter:h=>i==="pct"?`${h}%`:i==="units"?`${(h/1e6).toFixed(0)}M`:`$${h}B`,width:60}),C.jsx(Wr,{content:C.jsx(ane,{}),cursor:{fill:"rgba(250,189,0,0.05)"}}),C.jsx(eo,{dataKey:i==="equity"?"equity":i==="units"?"units":"equity_pct",radius:[4,4,0,0],maxBarSize:18,children:s.map((h,y)=>C.jsx(ic,{fill:h.color,opacity:.85},y))})]})})]}),C.jsxs("div",{className:"glass-card rounded-2xl border border-yellow-500/10 overflow-hidden",children:[C.jsx("div",{className:"px-6 py-4 border-b border-yellow-500/10",children:C.jsx("h2",{className:"font-orbitron font-bold text-white text-sm",children:"Full State Breakdown"})}),C.jsx("div",{className:"overflow-x-auto",children:C.jsxs("table",{className:"w-full text-sm",children:[C.jsx("thead",{children:C.jsx("tr",{className:"border-b border-white/5",children:["#","State","Symbol","Equity (B)","CHX Issuable","Properties","Avg Equity/Unit","Equity %"].map(h=>C.jsx("th",{className:"px-4 py-3 text-left text-[10px] font-orbitron text-gray-600 tracking-widest uppercase whitespace-nowrap",children:h},h))})}),C.jsx("tbody",{children:s.map((h,y)=>{const b=e.find(v=>v.state===h.state),S=En[h.state]||{},w=(h.equity*1e9/1e12).toFixed(2);return C.jsxs("tr",{className:"border-b border-white/5 hover:bg-yellow-500/5 transition-colors",children:[C.jsx("td",{className:"px-4 py-3 text-gray-600 font-orbitron text-xs",children:y+1}),C.jsx("td",{className:"px-4 py-3",children:C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx("span",{className:"text-base",children:S.icon||"🏠"}),C.jsx("span",{className:"font-space text-white text-xs whitespace-nowrap",children:h.state})]})}),C.jsx("td",{className:"px-4 py-3",children:C.jsx("span",{className:"font-orbitron text-xs px-2 py-0.5 rounded",style:{color:h.color,background:`${h.color}18`,border:`1px solid ${h.color}30`},children:S.symbol||`CHX-${h.abbr}`})}),C.jsxs("td",{className:"px-4 py-3 font-orbitron text-yellow-400 text-xs font-bold",children:["$",h.equity.toFixed(1),"B"]}),C.jsxs("td",{className:"px-4 py-3 font-orbitron text-cyan-400 text-xs",children:[w,"T"]}),C.jsx("td",{className:"px-4 py-3 font-space text-gray-300 text-xs",children:b!=null&&b.owner_occupied_units?Number(b.owner_occupied_units).toLocaleString():"—"}),C.jsx("td",{className:"px-4 py-3 font-space text-green-400 text-xs",children:b!=null&&b.avg_equity_per_unit?`$${Number(b.avg_equity_per_unit).toLocaleString()}`:"—"}),C.jsx("td",{className:"px-4 py-3",children:C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx("div",{className:"flex-1 h-1.5 rounded-full bg-white/5 w-16",children:C.jsx("div",{className:"h-full rounded-full",style:{width:`${h.equity_pct}%`,background:h.color,opacity:.7}})}),C.jsxs("span",{className:"text-xs font-space text-gray-400",children:[h.equity_pct,"%"]})]})})]},h.state)})})]})})]})]})]})}const lne=()=>{const{isLoadingAuth:e,isLoadingPublicSettings:t,authError:r,navigateToLogin:n}=T6();if(t||e)return C.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:C.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(r){if(r.type==="user_not_registered")return C.jsx(C6,{});if(r.type==="auth_required")return n(),null}return C.jsxs(n5,{children:[C.jsx(Vf,{path:"/",element:C.jsx(one,{})}),C.jsx(Vf,{path:"/dashboard",element:C.jsx(sne,{})}),C.jsx(Vf,{path:"*",element:C.jsx(A6,{})})]})};function une(){return C.jsx(P6,{children:C.jsxs(Y3,{client:u4,children:[C.jsxs(c5,{children:[C.jsx(j6,{}),C.jsx(lne,{})]}),C.jsx(O3,{})]})})}lB.createRoot(document.getElementById("root")).render(C.jsx(une,{}));